home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The World of Computer Software
/
World_Of_Computer_Software-02-385-Vol-1of3.iso
/
m
/
mod2tutr.zip
/
EXAMPLES.ZIP
/
CH14E2.MOD
< prev
next >
Wrap
Text File
|
1989-01-18
|
635b
|
42 lines
(* Chapter 14 - Programming exercise 2 *)
MODULE CH14E2;
FROM InOut IMPORT WriteInt, WriteLn;
FROM SYSTEM IMPORT ADR, TSIZE, ADDRESS;
VAR BigList : ARRAY[1..100] OF CARDINAL;
Index : INTEGER;
Point : ADDRESS;
BEGIN
FOR Index := 1 TO 100 DO
BigList[Index] := 200 + Index;
END;
Point := ADR(BigList[100]);
FOR Index := 1 TO 8 DO
WriteInt(INTEGER(Point^),6);
WriteLn;
Point := Point - 12 * TSIZE(INTEGER);
END;
END CH14E2.
(* Result of execution
300
288
276
264
252
240
228
216
*)