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

 
Output of file : CH07E1.MOD contained in archive : M2TUTOR.ZIP
(* Chapter 7 - Programming exercise 1 *)
(* Chapter 7 - Program 1 *)
MODULE CH07E1; (* Overall program construction example *)

FROM InOut IMPORT WriteString, WriteLn;

PROCEDURE Proc1;
BEGIN
WriteString("Procedure 1");
WriteLn;
Proc3; (* Illegal call *)
Proc5; (* Illegal call *)
END Proc1;

PROCEDURE Proc2;
PROCEDURE Proc3;
BEGIN
WriteString("Procedure 3");
WriteLn;
END Proc3;

PROCEDURE Proc4;
PROCEDURE Proc5;
BEGIN
WriteString("Procedure 5");
WriteLn;
END Proc5;
BEGIN
WriteString("Procedure 4");
WriteLn;
Proc5;
Proc3;
END Proc4;
BEGIN
WriteString("Procedure 2");
WriteLn;
Proc3;
Proc4;
END Proc2;

BEGIN
WriteString("Main Program");
WriteLn;
Proc2;
Proc1;
END CH07E1.




(* Result of execution

(Compile errors, will not compile or execute.)

*)



  3 Responses to “Category : Modula II Source Code
Archive   : M2TUTOR.ZIP
Filename : CH07E1.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/