Siebel eScript Language Reference > Siebel eScript Commands > The Global Object >

ToUint32() Method


This function converts its parameter to an integer in the range of 0 to 232 -1.

Syntax

ToUint32(value)

Parameter
Description
value
The value to be converted

Returns

If the result is NaN, +0. If the result is +0 , 0. If the result is POSITIVE_INFINITY, it returns Infinity. Otherwise, it returns the unsigned (that is, absolute value of) integer part of the number, rounded toward 0.

Usage

This function converts value to an unsigned integer part of value in the range of 0 through 232 - 1 (4,294,967,296). To use it without error, first pass value to isNaN() or to ToNumber().

To use isNan() without error, use a statement of the form

if (isNaN(value))
.
.   [error-handling statements];
.
else
   ToUint32(value);

Because ToUint32() truncates rather than rounds the value it is given, numbers are rounded toward 0. Therefore, 12.88 becomes 12.

CAUTION:  The ToUint32() function is unique to Siebel eScript. Avoid using it in a script that may be used with a JavaScript interpreter that does not support it.

See Also

ToInt32() Method, ToInteger() Method, ToNumber() Method, ToUint16() Method, and Math.round() Method


 Siebel eScript Language Reference 
 Published: 18 April 2003