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

 
Output of file : GARDEN.MOD contained in archive : M2TUTOR.ZIP
(* Chapter 13 - Program 5 *)
MODULE Garden;

FROM InOut IMPORT WriteString, WriteLn;
FROM RealInOut IMPORT WriteReal;
FROM Circles IMPORT AreaOfCircle, PerimeterOfCircle;

VAR Radius, Area, Circumference : REAL;

BEGIN (* Main program *)
Radius := 12.0;
AreaOfCircle(Radius,Area);
PerimeterOfCircle(Radius,Circumference);

(* Calculations complete - output results *)

WriteString("Radius = ");
WriteReal(Radius,12);
WriteString(" Area =");
WriteReal(Area,12);
WriteLn;
WriteString("Circumference = ");
WriteReal(Circumference,12);
WriteLn;
END Garden.




(* Result of execution

Radius = 1.2000E+001 Area = 4.5239E+002
Circumference = 7.5398E+001

*)



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