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

 
Output of file : PROCED1.MOD contained in archive : M2TUTOR.ZIP
(* Chapter 5 - Program 1 *)
MODULE Proced1;

FROM InOut IMPORT WriteString, WriteLn;

VAR Count : INTEGER;

PROCEDURE WriteHeader;
BEGIN
WriteString("This is the header");
WriteLn;
END WriteHeader;

PROCEDURE WriteMessage;
BEGIN
WriteString("This is the message");
WriteLn;
END WriteMessage;

PROCEDURE WriteEnding;
BEGIN
WriteString("This is the end");
WriteLn;
END WriteEnding;

BEGIN (* Main program *)
WriteHeader;
FOR Count := 1 TO 8 DO
WriteMessage;
END;
WriteEnding;
END Proced1.




(* Result of execution

This is the header
This is the message
This is the message
This is the message
This is the message
This is the message
This is the message
This is the message
This is the message
This is the end

*)


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