| Prev | Next | Start of Chapter | End of Chapter | Contents | Glossary | Index | Comments | (2 out of 14)

Introduction to Lists and Arrays

Lists and arrays, (items of the G2-LIST and G2-ARRAY classes of objects, respectively), consist of a series of elements. Depending on which class of list or array you use, elements can consist of:

You can reference list and array elements positionally, using an integer element index. The index of the first element of a list or array is zero.

Lists and Sequences

The sequence value type is a list-like entity whose elements can consist of items and values, including other sequences and structures. Using a sequence to store item references and values you can:

The use of sequences is described in more detail in Chapter 12, Attribute Access Facility.


Note: Be careful not to confuse the sequence data type with the general concept of a sequence of elements kept in a list or array, as described in this chapter.

| Prev | Next | Start of Chapter | End of Chapter | Contents | Glossary | Index | Comments | (2 out of 14)

Copyright © 1997 Gensym Corporation, Inc.