AsInteger function

Top  Previous  Next

Displays the given expression as an integer.  This will truncate, not round, a number with decimals.

 

Syntax

 

value = AsInteger( expression )

 

Parameters

expression

 

the expression to convert

 

 

 

returns

 

the converted expression

 

Examples

VARIABLES: floatOne, floatTwo TYPE: FLOATING

 

floatOne = "1.5"

floatTwo = "3.5"

 

print floatOne + floatTwo

' This prints "5"

 

print AsInteger(floatOne) + AsInteger(floatTwo)

' This prints "4" because the decimals were truncated.