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

 
Output of file : SIMPLOUT.MOD contained in archive : M2TUTOR.ZIP
(* Chapter 8 - Program 1 *)
MODULE SimplOut;

FROM InOut IMPORT WriteString, WriteLn; (* unqualified *)
IMPORT InOut; (* This imports every procedure in InOut *)
IMPORT Terminal; (* This imports every procedure in Terminal *)

VAR Index : CARDINAL;

BEGIN
WriteString("This is from InOut, ");
InOut.WriteString("and so is this.");
Terminal.WriteLn;

Terminal.WriteString("This is from Terminal, ");
Terminal.WriteString('and so is this.');
WriteLn;

FOR Index := 1 TO 10 DO
InOut.WriteCard(Index,5);
END;
InOut.WriteLn;
END SimplOut.




(* Result of execution

This is from InOut, and so is this.
This is from Terminal, and so is this.
1 2 3 4 5 6 7 8 9 10

*)



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