Siebel eScript Language Reference > About Siebel eScript > About Data Types and Numbers >

About Composite Data Types


This topic describes the composite data types that Siebel eScript uses. A composite data type is a complex type of data that can include properties and functions.

Overview of the Object Data Type

The ECMAScript standard uses the following description for an object:

A member of the type Object. It is an unordered collection of properties, each of which includes a primitive value, object, or function. A function stored in a property of an object is referred to as a method.

Siebel eScript does not use a class hierarchy that conforms to this ECMAScript standard. Instead, it instantiates an object in the following ways:

  • As an Object type
  • From an object that it instantiates as an Object type

These objects are new object types that Siebel eScript can use to instantiate other objects. Each object includes an implicit constructor function that it implements through the following command:

new

You can configure Siebel eScript to add properties dynamically to an object. An object inherits all the properties of the objects that reside in the ancestral chain of the object.

The object type known as Object is a generic object type. If you declare an object as an Object type, then it does not inherit properties from any object.

For more information, see Use a Primitive Data Type Instead of an Object Data Type.

Boolean Data Type

The value of a Boolean object is a bool value, which is true or false. It is a property of the Boolean object. If you use a Boolean variable in a numeric context, then Siebel eScript does the following conversion:

  • If the value of a bool variable is true, then it converts this value to 1.
  • If the value of a bool variable is false, then it converts this value to 0.

To create a Boolean object, you use the Boolean constructor in the type of expression:

new

String Data Type

The string value is a chars value. Siebel eScript adds it as a property of the String object. A pair of double or single quotation marks brackets a string. For example:

"I am a string"
'so am I'
"344"

In this example, the 344 string is an array of characters. The number 344 is a value that Siebel eScript can use in a numeric calculation.

To create a string data type, you use the String constructor in the following type of expression:

new

Siebel eScript does one of the following, depending on the context:

  • Converts a string to a number
  • Converts a number to a string

For more information, see How Siebel eScript Converts Data Types.

Number Data Type

The value of a number is a float value. It is a property of the Number object.

To create a number object, you use the Number constructor in the following type of expression:

new

For more information, see About Numbers.

Array Data Type

An array is a series of data that Siebel eScript stores in a variable. Each datum is associated with an index number or string. The following example illustrates how Siebel eScript stores data in an array:

var Test = new Array;
Test[0] = "one";
Test[1] = "two";
Test[2] = "three";

In this example, the Test variable is an array that includes three strings. You can write code that uses an array variable as one unit. To reference a string individually, you can append the bracketed index of the element after the array name.

To reference a property:

  • An array uses an index.
  • An object uses a property name or a method name.

For more information, see Array Methods.

Null Data Type

The null object indicates that a variable is empty. It does not contain a value, although it might have previously contained a value. The following term identifies a null data type:

null

The following keyword allows you to compare a value to a null object:

null

Null includes a literal representation. The following example is valid:

var test = null;

Siebel eScript can compare any variable that contains a null value to a null literal.

Other Object Types That Siebel eScript Supports

Table 3 lists other object types that Siebel eScript supports.

Table 3. Other Object Types That Siebel eScript Supports
Object
Description

Application

For more information, see Siebel Object Interfaces Reference.

BLOB

For more information, see BLOB Methods.

BLOB Descriptor

For more information, see About the BLOB Descriptor.

Buffer

For more information, see Buffer Methods.

Business Component

For more information, see Overview of Date Methods.

Business Object

For more information, see Siebel Object Interfaces Reference.

CfgItem

The CfgItem object is a Siebel Product Configuration object.

Clib

For more information, see Overview of the Clib Object.

CTIData

For more information, see Siebel Communications Server Administration Guide.

CTIService

For more information, see Siebel Communications Server Administration Guide.

Date

For more information, see Overview of Date Methods.

Exception

For more information, see Function Object.

File

For more information, see Clib Open File Method.

Math

For more information, see Mathematical Methods.

Property Set

For more information, see Siebel Object Interfaces Reference.

Regular Expression

For more information, see Regular Expression Methods.

SELib

For more information, see Siebel Library Methods.

Service

For more information, see Siebel Object Interfaces Reference.

Web Applet

For more information, see Siebel Object Interfaces Reference.

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