Contents    Page-10    Prev    Next    Page+10    Index   

Array Declarations

A simple array declaration has a form such as:

array [ low1 .. high1 ] of type
Such a declaration is processed as follows:
  1. Find the symbol table entry for type .

  2. Make a symbol table entry for the array type. The total size of the array is:
    (high1 - low1 + 1) * size(type)

Multiply dimensioned arrays can be treated as arrays of arrays, in the order specified for the language. In Pascal,
array[a..b,c..d] of T          is equivalent to
array[a..b] of array[c..d] of T .