Bookshelf Home | Contents | Index | PDF |
Siebel eScript Language Reference > Siebel eScript Language Overview > Data Types in Siebel eScript > Automatic Type Conversion in Siebel eScriptConversion occurs automatically during concatenation involving both strings and numbers, and is subject to the following rules:
The following examples illustrate these automatic conversions: "dog" + "house" == "doghouse" // two strings are joined However, to make sure that your code does not break if the conversion is not performed, use one of the casting functions to perform the appropriate conversion. (For details on these functions, read Conversion or Casting Methods.) The following example accepts string input and converts it to numeric to perform arithmetic: var n = "55"; To specify more stringent conversions, use the parseFloat() Method of the global object. Siebel eScript has many global functions to cast data as a specific type. Some of these are not part of the ECMAScript standard. Read parseFloat() Method. NOTE: There are circumstances under which conversion is not performed automatically. If you encounter such a circumstance, you must use one of the casting functions to get the desired result. For an explanation of casting functions, read Conversion or Casting Methods. |
Siebel eScript Language Reference |