SELECT fctno
FROM
0, 1 => {};
2 => { SRTest [x]; -- ABS --
IF x^.typ = M2D.inttyp THEN
{ M2H.LoadStk [x]; M2I.PutRJB [RJLB, 0, 0, 1, 0, 0, 6];
M2I.PutRR [RSUB, 1, 1, 1, 0, 12, 0, 12]; restyp ← M2D.inttyp }
ELSE IF x^.typ = M2D.realtyp THEN
{ M2H.Load [x]; restyp ← M2D.realtyp }
ELSE err [144] };
3 => { SRTest [x]; -- CAP --
IF x^.typ = M2D.chartyp THEN { M2H.LoadStk [x];
M2I.PutOB [LIB, 137B]; M2I.PutRR [RAND, 1, 1, 1, 0, 13, 14, 13] }
ELSE err [144] };
4 => { SRTest [x]; -- FLOAT --
IF x^.typ = M2D.cardtyp THEN M2H.Load [x] ELSE err [144] };
5 => { SRTest [x]; -- ODD --
IF (x^.typ = M2D.cardtyp) OR (x^.typ = M2D.inttyp) THEN
{ M2H.LoadStk [x];
M2I.PutOB [LIB, 1B]; M2I.PutRR [RAND, 1, 1, 1, 0, 13, 14, 13] }
ELSE err [144] };
6 => { SRTest [x]; -- ORD --
IF (x^.typ^.form <= Card) OR (x^.typ^.form = Enum) THEN M2H.Load [x]
ELSE err [144] };
7 => { -- TRUNC --
IF x^.typ = M2D.realtyp THEN M2H.Load [x] ELSE err [144] };
8 => { IF (x^.mode = typMd) OR (x^.mode = varMd) THEN
x^.val.I ← x^.typ^.size -- SIZE, TSIZE --
ELSE { err [145]; x^.val.I ← 1 };
x^.mode ← conMd; restyp ← M2D.cardtyp };
9 => {};
10 => { M2H.LoadAdrStk [x]; x^.mode ← stkMd -- ADR --};
11 => { IF x^.mode = typMd THEN -- MIN --
{ x^.mode ← conMd; restyp ← x^.typ;
SELECT x^.typ^.form FROM
Bool => { x^.val.B ← FALSE };
Char => { x^.val.Ch ← 0C };
Int => { x^.val.C ← 100000B };
Card => { x^.val.C ← 0 };
Real => { x^.val.D0 ← 177577B; x^.val.D1 ← 177777B };
Double => { x^.val.D0 ← 100000B; x^.val.D1 ← 0 };
Enum => { x^.val.C ← 0 };
Range => { range: M2D.RangePtr ← NARROW [x^.typ^.ext];
x^.val.I ← range^.min }
ENDCASE => err [144] }
ELSE err [145] };
12 => {IF x^.mode = typMd THEN -- MAX --
{ x^.mode ← conMd; restyp ← x^.typ;
SELECT x^.typ^.form FROM
Bool => { x^.val.B ← TRUE };
Char => { x^.val.Ch ← 377C };
Int => { x^.val.C ← 77777B };
Card => { x^.val.C ← 177777B };
Real => { x^.val.D0 ← 77577B; x^.val.D1 ← 177777B };
Double => { x^.val.D0 ← 77777B; x^.val.D1 ← 177777B };
Enum => { enum: M2D.EnumPtr ← NARROW [x^.typ^.ext];
x^.val.C ← enum^.NofConst - 1 };
Range => { range: M2D.RangePtr ← NARROW [x^.typ^.ext];
x^.val.I ← range^.max }
ENDCASE => err [144] }
ELSE err [145] };
13 => { IF (x^.mode = varMd) AND (x^.typ^.form = Array) THEN -- HIGH --
{ array: M2D.ArrayPtr ← NARROW [x^.typ^.ext];
IF array^.dyn THEN
{ var: M2D.VarPtr ← NARROW [x^.obj^.ext];
M2I.PutRR [RSUB, 1, 0, 1, 0, 15, var^.cell+1, 1]; -- SIZE-1
x^.mode ← stkMd; restyp ← M2D.cardtyp }
ELSE { range: M2D.RangePtr ← NARROW [array^.IndexTyp^.ext];
x^.mode ← conMd; x^.val.I ← range^.max;
restyp ← array^.IndexTyp }}
ELSE err [144] };
14 => { SRTest [x]; -- CHR --
IF (x^.typ # M2D.cardtyp) AND (x^.typ # M2D.inttyp) THEN err [144];
restyp ← M2D.chartyp };
15 => { SRTest [x]; -- LONG --
IF x^.typ^.form = Int THEN {}
ELSE IF x^.typ^.form = Card THEN {}
ELSE IF x^.typ^.form = Real THEN {restyp ← M2D.lrltyp }};
16, 17 => { f ← x^.typ^.form; -- INC, DEC --
IF (f <= Double) OR (f = Range) OR (f = Enum) THEN
{ SRTest [x]; M2G.PrepAss [x]; restyp ← x^.typ }