Introduction

Provides an overview of the use of objects in IBM ILOG Script.

Objects are values which do not contain any predefined properties or methods (except the toString method), but where new ones can be added. A new, empty object can be created using the Object constructor. For example, the following program creates a new object, stores it in the variable myCar, and adds the properties “name” and “year” to it:


myCar = new Object() // o contains no properties
myCar.name = "Ford"
myCar.year = 1985 

Now:


myCar.name  -> "Ford"
myCar.year  -> 1985