|
AsString Function |
Top Previous Next |
|
Displays the given expression as a string.
Syntax
stringVariable = AsString( expression, [ decimals ], [addCommas] )
Parameters
Example
VARIABLES: integerOne, integerTwo TYPE: INTEGER
integerOne = 123 integerTwo = 456
PRINT integerOne + integerTwo ' This prints "579"
PRINT AsString(integerOne) + AsString(integerTwo) ' This prints "123456"
Example
VARIABLES: floatVar TYPE: FLOATING
floatVar = 123.456789
PRINT AsString( floatVar, 2 )
' This prints "123.45"
VARIABLES: floatVar TYPE: FLOATING
floatVar = 123456.456789
PRINT AsString( floatVar, 2, true )
' This prints "123,456.45" |