JunkY.mesa
Copyright Ó 1987 by Xerox Corporation. All rights reserved.
Lucy Hederman August 7, 1987 4:18:53 pm PDT
BEGIN
T: TYPE = MACHINE DEPENDENT {p, q};
--A: PUBLIC TYPE = MACHINE DEPENDENT RECORD [a: PUBLIC {x, y}, b, v: PRIVATE SELECT t: T FROM p => [one, oneb: {a, b}], q => [two: {c, d}] ENDCASE];
--B: TYPE = MONITORED RECORD [a: {x, y}, w, v: SELECT OVERLAID * FROM p => [one: REF {x, y}], q => [two: {x, y}] ENDCASE];
--C: TYPE = RECORD [a: {x, y}, w: PUBLIC SEQUENCE t: {a, b, c} OF REF READONLY A];
the next type expression is a record of typeitems, i.e. the field list is made up of unnamed fields, and therefore there is no access (PUBLIC / PRIVATE) associated with them.
TypeList: TYPE = RECORD [T ← p, INT ←, {a, b} ← TRASH];
D: TYPE = [3..5);
DEnum: TYPE = {a, b, c, d, e};
DSub: TYPE = DEnum (b..d];
E: TYPE = PUBLIC REF ANY;
F: TYPE = REF;
G: TYPE = VAR F;
H: TYPE = ORDERED BASE POINTER TO READONLY T;
HH: TYPE = PRIVATE POINTER (0..4);
I: TYPE = LIST OF READONLY D;
Colours: TYPE = {red, blue};
J: TYPE = RECORD [a: {x, y}, w: PRIVATE SELECT t: T FROM red => [one, oneb: {a, b}], blue => [two: {c, d}] ENDCASE];
JDiscriminated: TYPE = red J;
J2Discriminated: TYPE = J.red;
J3Discriminated: TYPE = J[red];
K: TYPE = RECORD [SELECT t: T FROM red => [s: SEQUENCE size: INTEGER OF Colours], blue => [two: {c, d}] ENDCASE];
KSpecialized1: TYPE = K.red [10];
KSpecialized2: TYPE = red K [10];
x: NAT = SIZE [K];
y: NAT = SIZE [RECORD [SELECT t: T FROM red => [s: SEQUENCE size: INTEGER OF Colours], blue => [two: {c, d}] ENDCASE]];
z: NAT = SIZE [[0..3)];
END