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

 
Output of file : CH12E1.MOD contained in archive : M2TUTOR.ZIP
(* Chapter 12 - Programming exercise 1 *)
MODULE CH12E1;

FROM InOut IMPORT WriteString, WriteLn;
FROM Storage IMPORT ALLOCATE;
FROM SYSTEM IMPORT TSIZE;

TYPE Name = ARRAY[0..25] OF CHAR;

VAR Billy : POINTER TO Name;
Sally : POINTER TO Name;

BEGIN
ALLOCATE(Billy,TSIZE(Name));
ALLOCATE(Sally,TSIZE(Name));

Billy^ := "William Jones";
Sally^ := "Sally Ridgecrest";

WriteString(Billy^);
WriteLn;
WriteString(Sally^);
WriteLn;

END CH12E1.




(* Result of execution

William Jones
Sally Ridgecrest

*)



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