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

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

FROM InOut IMPORT WriteString, WriteCard, WriteLn;

TYPE Name = RECORD
FirstName : ARRAY[0..12] OF CHAR;
Initial : CHAR;
LastName : ARRAY[0..12] OF CHAR;
END;

VAR Friend : ARRAY[1..5] OF Name;
Index : CARDINAL;

BEGIN (* Main Program *)

Friend[1].FirstName := "Gwen";
Friend[1].Initial := 'J';
Friend[1].LastName := "Preston";
Friend[2].FirstName := "Joe";
Friend[2].Initial := 'R';
Friend[2].LastName := "Seale";
Friend[3].FirstName := "Marvin";
Friend[3].Initial := 'E';
Friend[3].LastName := "Johnson";
Friend[4].FirstName := "Bill";
Friend[4].Initial := 'C';
Friend[4].LastName := "Williams";
Friend[5].FirstName := "Judy";
Friend[5].Initial := 'C';
Friend[5].LastName := "Birdstone";

FOR Index := 1 TO 5 DO
WriteString(Friend[Index].FirstName);
WriteString(" ");
WriteString(Friend[Index].Initial);
WriteString(" ");
WriteString(Friend[Index].LastName);
WriteLn;
END;

END CH11E1.




(* Result of execution

Gwen J Preston
Joe R Seale
Marvin E Johnson
Bill C Williams
Judy C Birdstone

*)



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