XMesaCmplr13Defs4.mesa  23-Aug-87 12:42:14
Jim Foote January 20, 1988 11:12:32 am PST
<< Implements from XMesaCmplr12g. VAR procedures, procedure parameters, procedure results, and procedure constants are from XMesaCmplr12g. The record types fill in a few holes left by XMesaCmplr5.mesa in its testing of variant records. Complicated record constructors and extractors are tested. >>
XMesaCmplr13Defs4: DEFINITIONS =
BEGIN
Proc1: TYPE = PROCEDURE RETURNS [i: INTEGER];
ProcVar1: VAR Proc1;
Type11: Proc1;
Type12: Proc1;
DefaultProc1: VAR Proc1;
ReturnProc1: PROCEDURE [i: INTEGER] RETURNS [p: Proc1];
PassProc1: PROCEDURE [p: Proc1] RETURNS [i: INTEGER];
Proc2: TYPE =PROCEDURE [c: CARDINAL] RETURNS [rc: CARDINAL];
ProcVar2: VAR Proc2;
Type21: Proc2;
Type22: Proc2;
DefaultProc2: VAR Proc2;
ReturnProc2: PROCEDURE [i: INTEGER] RETURNS [p: Proc2];
PassProc2: PROCEDURE [p: Proc2] RETURNS [i: INTEGER];
Month: TYPE = [1..12];
Color: TYPE = {red, white, blue};
PA1: TYPE = PACKED ARRAY [1..3] OF CHARACTER;
PA2: TYPE = PACKED ARRAY [1..4) OF Month;
PA3: TYPE = PACKED ARRAY (0..3] OF BOOLEAN;
PA4: TYPE = PACKED ARRAY (0..4) OF Color;
PA5: TYPE = PACKED ARRAY [1..3] OF PA1;
PointerSizeRec: TYPE = RECORD [ int: INTEGER, ch1: CHAR, ch2: CHAR ];
PSRPointer: TYPE = LONG POINTER TO PointerSizeRec;
ArrayOfPSR: TYPE = ARRAY [1..3] OF PointerSizeRec;
InlineRetPSR: PROCEDURE [r: PointerSizeRec]
RETURNS [r1: PointerSizeRec] = INLINE {RETURN [r];};
PackedRec: TYPE = RECORD [
arm1: PA1,
arm2: PA2,
arm3: PA3,
arm4: PA4,
arm5: PA5];
SimpleRec: TYPE = RECORD [
a: CHARACTER,
b: BOOLEAN,
c: Color,
p: PackedRec];
RecOfRec: TYPE = RECORD [
arm1: BOOLEAN,
arm2: PackedRec,
arm3: SimpleRec];
END.