next up previous
Next: Constant definitions Up: The Pascal type model Previous: File types

Pointer types

Pointer types[22]:
CLASS ptrType(domainType) BEGIN
  OPER
    ptrOrd(ptrType): intType;
    ptrderef(ptrType): domainType;
    ptreq, ptrne(ptrType,ptrType): boolType;
    ptrNewDisp(ptrType): voidType;
  COERCION
    (nilType): ptrType;
END;

INDICATION
  ordType: ptrOrd;
  deref: ptrderef;
  equal: ptreq;
  lsgt: ptrne;
  newType: ptrNewDisp;
  disposeType: ptrNewDisp;
This macro is invoked in definition 3.

Establish a user-defined type[23]:
RULE: TypeDenoter ::=  '^' type COMPUTE
  TypeDenoter.GotType=
    AddTypeToBlock(
      TypeDenoter.Type,
      PointerTypes,
      SingleDefTableKeyList(type.Type));
  TypeDenoter.GotOper=
    InstClass1(ptrType,TypeDenoter.Type,type.Type);
END;
This macro is defined in definitions 4, 10, 13, 15, 16, 18, 21, and 23.
This macro is invoked in definition 1.

Property definitions[24]:
PointerTypes;
This macro is defined in definitions 11, 19, 24, 30, 34, and 38.
This macro is invoked in definition 7.



2008-08-29