VMS Help PASCAL, Data Types, Structured Types, ARRAY *Conan The Librarian (sorry for the slow response - running on an old VAX) |
An array is a group of components (called elements) that all have the same data type and share a common identifier. An individual element of an array is referred to by an ordinal index (or subscript) that designates the element's position (or order) in the array. Syntax: [[PACKED]] ARRAY [ {[[attribute-list]] index-type},... ] OF [[attribute-list]] component-type The 'attribute-list' is one or more optional identifiers that provide information about the component type. The 'index-type' is the type of the index, which can be any ordinal type or discriminated ordinal schema type. The 'component-type' is the type of the array components, which can be any type. The components of an array can be another array. Example: ARRAY [0..4] OF INTEGER An array, whose components are themselves arrays, is called a multidimensional array. An array can have any number of dimensions, and each dimension can have a different index type. Example: ARRAY [0..4, 'A'..'D'] OF INTEGER This array is declared as two-dimensional. To refer to a component of this two-dimensional array, specify the variable name followed by the two bracketed index values. For example X[0,'A'] or X[0]['A'] specify the component in 'X' at position '0', 'A'.
Additional Information (explode) :
|