Bookshelf Home | Contents | Index | Search | PDF | ![]() ![]() ![]() ![]() |
Siebel eScript Language Reference > Siebel eScript Commands > The Global Object >
parseInt() Method
This method converts an alphanumeric string to an integer number.
Syntax
parseInt(string)
Returns
An integer number; if string cannot be converted to a number, the special value NaN is returned.
Usage
Whitespace characters at the beginning of the string are ignored. The first non-white-space character must be either a digit or a minus sign (-). Numeric characters in string are read. Reading stops at the first non-numeric character. The result is converted into an integer number. Characters including and following the first non-numeric character are ignored.
Example
The following code fragment returns the result
-234
:var num = parseInt(" -234.37 profit");
Bookshelf Home | Contents | Index | Search | PDF | ![]() ![]() ![]() ![]() |
Siebel eScript Language Reference Published: 18 April 2003 |