Skip to main content

int

int ( number : number ) : number

ParameterTypeDescription
numbernumber->Number whose integer portion is returned
Resultnumber<-Integer 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