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

 
Output of file : CH03E2.MOD contained in archive : M2TUTOR.ZIP
(* Chapter 3 - Programming exercise 2 *)
MODULE CH03E2;

FROM InOut IMPORT WriteString, WriteLn;

VAR CardNumber : CARDINAL;
IntNumber : INTEGER;
CharValue : CHAR;

BEGIN

IntNumber := -1;
CardNumber := IntNumber; (* Execution error *)

CharValue := 'A';
CardNumber := CharValue; (* Compile error *)

END CH03E2.




(* Result of execution

(The programs contains errors. It will not compile or execute.)
(Remove the compile errors to see the executable errors.)

*)



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