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

ToObject() Method


This function converts its parameter to an object.

Syntax

ToObject(value)

Parameter
Description
value
The value to be converted to an object

Returns

A value that depends on value's original data type, according to the following table:

Data Type
Returns
Boolean
A new Boolean object having the value value
null
(Generates a run-time error)
number
A new Number object having the value value
object
value
string
A new string object having the value value
undefined
(Generates a run-time error)

Usage

This function converts its parameter to an object.

CAUTION:  The ToObject() 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

ToString() Method


 Siebel eScript Language Reference 
 Published: 18 April 2003