contents   index   previous   next



global.ToInteger()

syntax:

ToInteger(value)

where:

value - to be cast as an integer.

 

return:

number - conversion of value.

 

description:

This function converts value to an integer type. First, call global.ToNumber(). If result is NaN, return +0. If result is +0, -0, +Infinity or -Infinity, return result. Else return floor(abs(result)) with the appropriate sign. For example, the value -4.8 is converted to -4.

 

see:

global.ToInt32(), global.ToNumber()

 

 


global.ToNumber()