Contents    Page-10    Prev    Next    Page+10    Index   

Pointer Reference

An example of a pointer declaration is:


   var p: ^person

Note that the POINTERSYM record points to the name of the record rather than to the RECORDSYM entry.

A pointer reference such as:


   p^.friend
is handled like an array reference, with the pointer reference in the base address location:

   (aref (^ p) 4)
where we assume that 4 is the offset of the friend field from the start of the person record.

The file pasrec.sample contains examples of code that is compiled for pointer references.