Each of the array declaration commands can create or resize one-dimensional or two-dimensional arrays. Example:
Two-dimensional arrays are essentially language objects; you can neither display nor print them.
In the previous example:
- atTopics is a two-dimensional array
- atTopics{8}{5} is the 5th element (5th column...) of the 8th row
- atTopics{20} is the 20th row and is itself a one-dimensional array
- Size of array(atTopics) returns 100, which is the number of rows
- Size of array(atTopics{17}) returns 50, which the number of columns for the 17th row
In the following example, a pointer to each field of each table in the database is stored in a two-dimensional array:
Provided that this two-dimensional array has been initialized, you can obtain the pointers to the fields for a particular table in the following way:
Note: As this example suggests, rows of a two-dimensional arrays can be the same size or different sizes.