Please enable JavaScript to view this site.

ESL Documentation

The members function can be applied to any class name. The value returned by ESL is a string of names of all the objects in the specified class, separated by spaces. For example, if you have defined a class named PrintColors and want to reposition these objects, use the members function:

 

string PrintStr integer XPos

 

class PrintColors is PrintRed PrintGreen PrintBlue

 

...

 

response to Change

   copy 100 to XPos

   extract from members of PrintColors

     take word PrintStr # Reset marker; get first object.

   change PrintStr position to XPos 40 in Print2

   copy (XPos + 100) to XPos

   while (marker < length of members of PrintColors) loop

       extract from members of PrintColors

       skip to marker

       take word PrintStr

       change PrintStr position to XPos 40 in Print2

       copy (XPos + 100) to XPos

   end loop

 

If any name in the class is ambiguous, ESL will return the object's entire ancestry for clarification. For example, if you have defined two objects and a class as follows:

 

key One at position 10 10 in Calculator

 

Class Keys is

    KeyA KeyB One

 

key One at position 10 10 in DigitPad

 

and then later specify in your program the function:

 

members of Keys

 

ESL returns the string "KeyA KeyB Calculator/One". If you specify ancestry when you add an object to a class, the members function will return the object name along with the ancestry you specified, even if the object name is not ambiguous.