# Category : Modula II Source Code

Archive : M2TUTOR.ZIP

Filename : BIGCASE.MOD

MODULE BigCase;

FROM InOut IMPORT WriteString, WriteInt, WriteLn;

VAR Dummy : INTEGER;

Index : INTEGER;

BEGIN

FOR Dummy := 1 TO 7 DO

WriteInt(Dummy,4);

WriteString(" ");

CASE Dummy OF

1,5,6 : IF Dummy > 5 THEN

WriteString("The number is six.");

ELSE

FOR Index := 1 TO Dummy DO

WriteString("XXXXX ");

END;

END; |

2 : FOR Index := 1 TO 5 DO

WriteString(" It is 2 ");

END; |

3,7 : WriteString("It is 3 or 7");

WriteString(" which turns out");

WriteString(" to be very good."); |

ELSE

WriteString("The number 4 will not be used.");

END; (* of CASE *)

WriteLn;

END; (* of FOR loop *)

END BigCase.

(* Result of execution

1 XXXXX

2 It is 2 It is 2 It is 2 It is 2 It is 2

3 It is 3 or 7 which turns out to be very good.

4 The number 4 will not be used.

5 XXXXX XXXXX XXXXX XXXXX XXXXX

6 The number is six.

7 It is 3 or 7 which turns out to be very good.

*)

Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

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/