Category : Modula II Source Code
Archive   : M2TUTOR.ZIP
Filename : CONSTANT.MOD

 
Output of file : CONSTANT.MOD contained in archive : M2TUTOR.ZIP
(* Chapter 6 - Program 4 *)
MODULE Constant;

CONST MaxSize = 12;
IndexStart = 49;
CheckItOut = TRUE;

TYPE BigArray = ARRAY[1..MaxSize] OF CARDINAL;
CharArray = ARRAY[1..MaxSize] OF CHAR;

VAR AirPlane : BigArray;
SeaPlane : BigArray;
Helicopter : BigArray;
Cows : CharArray;
Horses : CharArray;
Index : CARDINAL;

BEGIN (* main program *)
FOR Index := 1 TO MaxSize DO
AirPlane[Index] := Index*2;
SeaPlane[Index] := Index*3 + 12;
Helicopter[MaxSize - Index + 1] := Index + AirPlane[Index];
Horses[Index] := 'X';
Cows[Index] := "R";
END; (* of Index loop *)
END Constant.




(* Result of execution

(There is no output from this program.)

*)



  3 Responses to “Category : Modula II Source Code
Archive   : M2TUTOR.ZIP
Filename : CONSTANT.MOD

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/