Siebel eScript Language Reference > Siebel eScript Language Overview > Data Types in Siebel eScript >

Data Typing in Siebel eScript

You can specify a variable's data type in two ways:

  • Typed (or strongly typed) variables. You specify the data type in the variable's declaration by appending a colon ":" and the data type after the variable name. For example:

    var a : Date = new Date ();
    var BO:BusObject;
    var BC:BusComp;

    Binding and type checking of strongly typed variables occurs at compile time. Typically, a strongly typed variable provides improved execution over its typeless counterpart. It also enables the compilation warning for incorrect methods and properties.

    NOTE:  To strongly type variables, you must implement the ST eScript engine.

    For information on implicit type conversions, see Implicit Type Conversion in Siebel eScript.

    For information on implementing the ST eScript engine, see Using Siebel Tools.

  • Typeless variables. You do not specify the data type in the variable's declaration. For example:

    var count = 0;
    var a = new Date ();
    var BO = new BusObject;

    At run time, the type is determined by the Siebel eScript interpreter when the variable is first used. The type remains until a later assignment changes the type implicitly. In the preceding examples, the assigning of the value zero types variable count as integer. Similarly, variable a is of type Date and BO is of type BusObject.

Siebel eScript Language Reference