int()

Availability

Flash Lite 1.0.

Usage

int(value)

Operands

value A number or string to be truncated to an integer.

Description

Function; truncates a decimal number to an integer value.

Example

The following example truncates the numbers in the distance and myDistance variables:

distance = 6.04 - 3.96;
//trace ("distance = " add distance add " and rounded to:" add int(distance));
// Output: distance = 2.08 and rounded to: 2
myDistance = "3.8";
//trace ("myDistance = " add int(myDistance));
// Output: 3