Within the system-defined class hierarchy, nine system-defined parallel subclasses for lists and arrays exist, each capable of containing these elements:
To see the class hierarchy of lists and arrays using Inspect, enter:
show on a workspace the class hierarchy of g2-list
show on a workspace the class hierarchy of g2-array
G2-LIST and G2-ARRAY, and from any of their subclasses as you would any other user-defined class. When creating a new list or array class, always use the most specific type possible for your requirements.
FLOAT-LIST as the superior class, not QUANTITY-LIST.
ITEM-ARRAY as the superior class rather than G2-ARRAY.
Array-is-permanent or List-is-permanent as yes in the Attribute-initializations attribute of the class definition.For classes with
VALUE-ARRAY as a direct superior class, you can include values of any type (float, integer, symbol, text, and truth-value, but not items), as the following example indicates:
![]() |
Notice that you must precede symbolic values (me, you and us in this example) with the statement the symbol, as described in Specifying Symbolic Initial Values in Arrays.
For new classes with
ITEM-LIST or ITEM-ARRAY as a direct superior class, the elements of the list or array can be generic or specific to a particular item class. To create a list or array of a specific item class, use an class definition to create a subclass of ITEM-LIST or ITEM-ARRAY. Attribute-initializations attribute to specify a particular class of items for the Element-type attribute. When you specify a class name for the Element-type attribute, all elements within the list or array must be instances of that class.
Class-Specific Attributes
These are the class-specific attributes of lists and arrays: