Next: , Previous: , Up: Subscripts   [Contents][Index] Coordinate Subscripts

Reference to particular elements of an array by coordinates is done by appending to the array the coordinates of the desired element, separated by commas and enclosed in parentheses. The coordinates of the first element of an array are all equal to zero. For instance, you select the first element of a one-dimensional array named y by y(0), the second element by y(1), etcetera. The elements of a 3-by-2 array named u are referred to as u(0,0), u(1,0), u(2,0), u(0,1), u(1,1), and u(2,1).

The same holds also for file arrays (File Arrays). Associated variables (Associated Variables) and strings (Strings) allow only one coordinate.

If the /SEPARATE keyword is used, then the elements of a single subscript of a numerical array type are interpreted as if each was specified as a separate scalar. In that case, only the single array is allowed as a subscript, and it must have exactly one element for each dimension of the source data, unless /ZERO or /ALL are specified (Multiple Subscripts for those keyword). For example, if x is a three-dimensional numerical array, then x([2,4,5], /SEPARATE) is equivalent to x(2,4,5).