Siebel eScript Language Reference > Siebel eScript Language Overview >

Data Types in Siebel eScript

Data types in Siebel eScript can be classified into three groupings: primitive, composite, and special. In a script, data can be represented by literals or variables. The following lines illustrate variables and literals:

var TestVar = 14;
var aString = "test string";

The variable TestVar is assigned the literal 14, and the variable aString is assigned the literal test string. After these assignments of literal values to variables, the variables can be used anywhere in a script where the literal values can be used.

Data types need to be understood in terms of their literal representations in a script and of their characteristics as variables.

Data, in literal or variable form, is assigned to a variable with an assignment operator, which is often merely an equal sign, "=", as the following lines illustrate:

var happyVariable = 7;
var joyfulVariable = "free chocolate";
var theWorldIsFlat = true;
var happyToo = happyVariable;

The first time a variable is used, its type is determined by the Siebel eScript interpreter, and the type remains until a later assignment changes the type automatically. The preceding example creates three different types of variables. The first is a number, the second is a string, and the third is a Boolean variable.

Because Siebel eScript automatically converts variables from one type to another when needed, programmers normally do not have to worry about type conversions as they do in strongly typed languages, such as C.

Siebel eScript Language Reference