| 1 |
(* Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. *) |
| 2 |
(* This file is part of GNU Modula-2. |
| 3 |
|
| 4 |
GNU Modula-2 is free software; you can redistribute it and/or modify it under |
| 5 |
the terms of the GNU General Public License as published by the Free |
| 6 |
Software Foundation; either version 2, or (at your option) any later |
| 7 |
version. |
| 8 |
|
| 9 |
GNU Modula-2 is distributed in the hope that it will be useful, but WITHOUT ANY |
| 10 |
WARRANTY; without even the implied warranty of MERCHANTABILITY or |
| 11 |
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
| 12 |
for more details. |
| 13 |
|
| 14 |
You should have received a copy of the GNU General Public License along |
| 15 |
with gm2; see the file COPYING. If not, write to the Free Software |
| 16 |
Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *) |
| 17 |
|
| 18 |
MODULE record3 ; |
| 19 |
|
| 20 |
FROM StrIO IMPORT WriteString, WriteLn ; |
| 21 |
FROM NumberIO IMPORT WriteCard ; |
| 22 |
FROM SYSTEM IMPORT TSIZE, SIZE ; |
| 23 |
|
| 24 |
TYPE |
| 25 |
QuadOperator = (BecomesOp, IndrXOp, XIndrOp, BaseOp, ElementSizeOp, |
| 26 |
AddrOp, |
| 27 |
SizeOp, |
| 28 |
OffsetOp, |
| 29 |
IfEquOp, IfLessEquOp, IfGreEquOp, IfGreOp, IfLessOp, |
| 30 |
IfNotEquOp, IfInOp, IfNotInOp, |
| 31 |
CallOp, ParamOp, OptParamOp, ReturnOp, ReturnValueOp, FunctValueOp, |
| 32 |
NewLocalVarOp, KillLocalVarOp, ProcedureScopeOp, |
| 33 |
DummyOp, |
| 34 |
GotoOp, EndOp, StartOp, |
| 35 |
NegateOp, AddOp, SubOp, DivOp, MultOp, ModOp, |
| 36 |
LogicalOrOp, LogicalAndOp, LogicalXorOp, LogicalDiffOp, |
| 37 |
InclOp, ExclOp, |
| 38 |
UnboundedOp, HighOp, |
| 39 |
CoerceOp, ConvertOp, |
| 40 |
StartDefFileOp, StartModFileOp, EndFileOp, |
| 41 |
CodeOnOp, CodeOffOp, |
| 42 |
ProfileOnOp, ProfileOffOp, |
| 43 |
OptimizeOnOp, OptimizeOffOp, |
| 44 |
InlineOp, LineNumberOp, |
| 45 |
SubrangeLowOp, SubrangeHighOp, |
| 46 |
BuiltinConstOp, StandardFunctionOp) ; |
| 47 |
|
| 48 |
QuadFrame = RECORD |
| 49 |
Operator : QuadOperator ; |
| 50 |
Operand1 : CARDINAL ; |
| 51 |
Operand2 : CARDINAL ; |
| 52 |
Operand3 : CARDINAL ; |
| 53 |
Next : CARDINAL ; |
| 54 |
LineNo : CARDINAL ; |
| 55 |
TokenNo : CARDINAL ; |
| 56 |
NoOfTimesReferenced: CARDINAL ; |
| 57 |
END ; |
| 58 |
|
| 59 |
CONST |
| 60 |
MaxQuad = 50000 ; |
| 61 |
|
| 62 |
VAR |
| 63 |
Quads: ARRAY [1..MaxQuad] OF QuadFrame ; |
| 64 |
BEGIN |
| 65 |
WriteString('SIZE(QuadFrame) = ') ; WriteCard(TSIZE(QuadFrame), 6) ; |
| 66 |
WriteLn ; |
| 67 |
WriteString('SIZE(QuadFrame) = ') ; WriteCard(SIZE(Quads), 6) ; |
| 68 |
WriteLn |
| 69 |
END record3. |