Bookshelf Home | Contents | Index | PDF |
Siebel eScript Language Reference > Siebel eScript Language Overview > Data Types in Siebel eScript > Special Data Types in Siebel eScriptThis section discusses the undefined, null, and NaN (not a number) data types. UndefinedIf a variable is created or accessed with nothing assigned to it, it is of type undefined. An undefined variable merely occupies space until a value is assigned to it. When a variable is assigned a value, it is assigned a type according to the value assigned. Although variables may be of type undefined, there is no literal representation for undefined. Consider the following invalid fragment: var test; After var NullNull is a special data type that indicates that a variable is empty, and this condition is different from undefined. A null variable holds no value, although it might have previously held one. The null type is represented literally by the identifier, null. Because Siebel eScript automatically converts data types, null is both useful and versatile. Because null has a literal representation, an assignment such as the following is valid: Any variable that has been assigned a value of null can be compared to the null literal. NaNThe NaN type means "not a number," and NaN is an abbreviation for the phrase. However, NaN does not have a literal representation. To test for NaN, the function, isNaN(), must be used, as illustrated in the following fragment: var Test = "a string"; When the parseInt() function tries to parse the string |
Siebel eScript Language Reference |