Skip to main content
Version: 1.0.0

int

int* ( number : number ) : number

ParameterTypeDescription
numbernumberNumber whose integer portion is returned
ResultnumberInteger portion of number

Description

int returns the integer portion of number. int truncates a negative number away from zero.

Example

The following example illustrates how int works for both positive and negative numbers. Note that the decimal portion of the number is removed:

 var vlResult : number
vlResult = int(123.4) // vlResult gets 123
vlResult = int(-123.4) // vlResult gets –124

See also

dec