Please enable JavaScript to view this site.

ESL Documentation

You define a class, and provide the names of the objects that are members of the class, by specifying a class definition. All of the objects specified in the class definition must have been previously defined in the ESL program.

 

For example:

 

key Print at position 250 200

    ...

key Graph at position 250 150

    ...

key UpArrow at position 250 250

    ...

key DownArrow at position 250 100

    ...

key Help at position 250 50

    ...

 

class MenuKeys is

    Print Graph UpArrow DownArrow Help

 

A class can be initially null. The set of objects defined as being members of a class is not static; during runtime, you can add objects to, and delete objects from, a class. This is described in detail in Specifying Actions for a Class of Objects.

 

An object can be a member of more than one class; for example:

 

class Numbers is One Two Three Four Five Six Seven Eight

class Choices

 

response to Numbers

    add object to class Choices

    make object blue

 

response to Choices

    send parameter to Focus

    make object yellow

 

You cannot define a class as a member of another class; only objects can be class members. You can add a class of objects to another class, but this just adds all the objects of the first class to the second class. See the add to class statement in Specifying Actions for a Class of Objects.