User Tools

Site Tools


lrconversion

Conversion

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:



  • New functions (recommended)

Read http://www.kbasic.com/doku.php?id=lrbuiltins#cast






  • Old functions provided for VB6 compatibility

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 www.kbasic.com_images_vb6.jpg

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'. www.kbasic.com_images_vb6.jpg

Str : Convert number to string

Val : VAL returns the numerical value of the string$.

Day, Month, Weekday, Year : date related conversion www.kbasic.com_images_vb6.jpg

DateSerial, DateValue : date related conversion www.kbasic.com_images_vb6.jpg

TimeSerial, TimeValue : time related conversion www.kbasic.com_images_vb6.jpg

COMMENTS

How a comment should be

Some description here…

Example

some code

Written by AUTHOR

Date 2007-02-22

lrconversion.txt · Last modified: 2013/04/09 22:57 (external edit)