Reference Resolution

The following is the sequence of steps taken by the Compiler to resolve references:

  1. Determine the initial block in which the search for the declaration begins.
  2. Find the referenced declaration and the block to which it belongs. Find the activation associated with that block.
  3. Evaluate the locator qualifier (if any) to obtain a pointer value.
  4. Evaluate the basis reference (if the reference is to a defined variable) and pointer.
  5. Determine all the extents (if any) of the referenced variables.
  6. Interpret the subscripts (if any).
  7. Invoke the procedure (if any).

Remember the following points when preparing for reference resolution: