Siebel eScript Language Reference > Using Siebel eScript > Coding with Siebel eScript >

Using Strongly Typed and Typeless Variables


A variable can include one of the following:

  • Strongly typed. You specify the data type when you declare the variable. ST eScript code supports strong typing. Siebel CRM binds strong typing when you compile the code.
  • Typeless. Siebel CRM determines the data type at run time. ST eScript code and T eScript code supports typeless variables.

A strongly typed variable typically improves performance over a typeless variable.

You can write code that strongly types all of the primitive data types and object data types. For more information, see About Primitive Data Types and About Composite Data Types.

Creating a Strongly Typed Variable

This topic describes how to create a strongly typed variable.

To create a strongly typed variable

  1. Make sure Siebel Tools uses the ST eScript engine.

    For more information, see Using Siebel Tools.

  2. When you declare the variable, make sure you add a colon (:) at the end of the variable name.

    For example:

    var VariableA:Date = new Date ();
    var VariableB:BusObject;
    var VariableC:BusComp;

Creating a Typeless Variable

This topic describes how to create a typeless variable.

To create a typeless variable

  • Do not specify the data type when you declare the variable.

    For example:

    var VariableA = 0;
    var VariableB = new Date ();
    var VariableC = new BusObject;

    In this example, Siebel eScript sets the following types:

    • Sets VariableA as an integer
    • Sets VariableB as a date
    • Types VariableC as a business object

      The data type that Siebel CRM sets at run time persists until a subsequent operation causes the interpreter to modify the type again.

Siebel eScript Language Reference Copyright © 2018, Oracle and/or its affiliates. All rights reserved. Legal Notices.