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

Conversion or Casting Functions


Though Siebel eScript does well in automatic data conversion, there are times when the types of variables or data must be specified and controlled. Each of the following casting functions has one parameter, which is a variable or data item, to be converted to or cast as the data type specified in the name of the function. For example, the following fragment creates two variables:

var aString = ToString(123);
var aNumber = ToNumber("123");

The first variable, aString, is created as a string from the number 123 converted to or cast as a string. The second variable, aNumber, is created as a number from the string "123" converted to or cast as a number. Because aString had already been created with the value "123", the second line could also have been:

var aNumber = ToNumber(aString);

Use the following eScript methods when casting or converting between data types:


 Siebel eScript Language Reference 
 Published: 18 April 2003