Bookshelf Home | Contents | Index | PDF |
Siebel eScript Language Reference > About Siebel eScript > About Data Types and Numbers > About Composite Data TypesThis 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 TypeThe 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: 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: 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 TypeThe 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:
To create a Boolean object, you use the Boolean constructor in the type of expression: String Data TypeThe 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: 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: Siebel eScript does one of the following, depending on the context: For more information, see How Siebel eScript Converts Data Types. Number Data TypeThe 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: For more information, see About Numbers. Array Data TypeAn 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; 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. For more information, see Array Methods. Null Data TypeThe 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: The following keyword allows you to compare a value to a null object: Null includes a literal representation. The following example is valid: Siebel eScript can compare any variable that contains a null value to a null literal. Other Object Types That Siebel eScript SupportsTable 3 lists other object types that Siebel eScript supports.
|
Siebel eScript Language Reference | Copyright © 2018, Oracle and/or its affiliates. All rights reserved. Legal Notices. | |