Bookshelf Home | Contents | Index | Search | PDF |
Siebel eScript Language Reference > Siebel eScript Commands > The Global Object >
defined() Method
This function tests whether a variable or object property has been defined.
Syntax
defined(var)
Returns
True if the item has been defined; otherwise, false.
Usage
This function tests whether a variable or object property has been defined, returning true if it has or false if it has not.
CAUTION: The defined() 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.
Example
The following fragment illustrates two uses of the defined() method. The first use checks a variable,
t.
The second use checks an objectt.t.
var t = 1;
if (defined(t))
TheApplication().Trace("t is defined");
else
TheApplication().Trace("t is not defined");if (!defined(t.t))
TheApplication().Trace("t.t is not defined"):
else
TheApplication().Trace("t.t is defined");See Also
Bookshelf Home | Contents | Index | Search | PDF |
Siebel eScript Language Reference Published: 18 April 2003 |