Normally you do not have to change the a data type of an expression. It is usually done for you without notice. Sometimes it might be important to force a conversion because your calculating would be else wrong. There exists some conversion built in-functions for any data type:
Read http://www.kbasic.com/doku.php?id=lrbuiltins#cast
Bin : BIN returns a string giving the binary (base 2) representation of 'number'.
CBool : CBOOL converts any number to a boolean.
CByte : CBYTE converts any number to a byte.
CDbl : CDBL converts any number to a double.
CInt : CINT converts any number to an integer.
CLng : CLNG converts any number to a long.
CSng : CSNG converts any number to a single.
CVErr : returns a user defined error
Fix : FIX cuts off the trail of a number
Hex : HEX returns a string giving the hexadecimal (base 16) value for the 'number'.
Int : returns the next integer number < = given number
Oct : OCT returns a string giving the octal (base 8) representation of 'number'.
Str : Convert number to string
Val : VAL returns the numerical value of the string$.
Day, Month, Weekday, Year : date related conversion
DateSerial, DateValue : date related conversion
TimeSerial, TimeValue : time related conversion
Some description here…
Example
some code
Written by AUTHOR
Date 2007-02-22