# Category : Modula II Source Code

Archive : M2TUTOR.ZIP

Filename : INTVAR.MOD

MODULE IntVar;

FROM InOut IMPORT WriteLn, WriteString, WriteInt;

VAR Count : INTEGER; (* The sum of two variables *)

x,y : INTEGER; (* The two variables to add *)

BEGIN

x := 12;

y := 13;

Count := x + y;

(* Assignments complete, now display the results *)

WriteString("The value of x =");

WriteInt(x,3);

WriteLn;

WriteString("The value of y =");

WriteInt(y,4);

WriteLn;

WriteString("The sum of them =");

WriteInt(Count,6);

WriteLn;

x := 0FFH; (* This is the way to assign a hexadecimal number *)

y := 177B; (* This is the way to assign an octal number *)

END IntVar.

(* Result of execution

The value of x = 12

The value of y = 13

The sum of them = 25

*)

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/