Type conversion functions


str   

Syntax

strvalue  = str( string_number )
Description: Return string from integer or double number

Parameter description:

Name Type
Description
string_number
integer or double
value to be converted to a string


Return value:
strvalue = value converted to string


Code example
:

Get a string from the value 100+23 (Result = "123" )

 print str( 100 + 23 )


toLong  


Description: Retrieve an integer value from a string

Syntax:

retstr = toLong( instring ) 


Parameter description
:

Name Type
Description
instring
string
string that represents the number


Return value:
Integer value created from numbers in string (Characters allowed 0..9).


Code example
:

Convert the string "123" to an integer value.

 print toLong( "123" )

toDouble 


Description: Retrieve a double value from a string

Syntax:

dval = toDouble( instring ) 


Parameter description
:

Name Type
Description
instring
string
String to retrieve double value from


Return value:
Double value created from numbers in string (Characters allowed 0..9).


Code example
:

Convert the string "12.34E11" to a double value..

 print left( "12.34E11" )