Category : Pascal Source Code
Archive   : PASTUT.ZIP
Filename : PERIMS.PAS

 
Output of file : PERIMS.PAS contained in archive : PASTUT.ZIP
(* Chapter 13 - Program 2 *)
unit Perims;
(*****************************************************************)
(* *)
(* This unit contains three procedures to calculate perimieters *)
(* of three geometric shapes. *)
(* *)
(*****************************************************************)

interface
procedure Perimeter_Of_Circle(Radius : real;
var Perimeter : real );
procedure Perimeter_Of_Square(Length_Of_Side : real;
var Perimeter : real);
procedure Perimeter_Of_Rectangle(Length,Width : real;
var Perimeter : real);

implementation

var My_Pi : real;


procedure Perimeter_Of_Circle;
begin
Perimeter := My_Pi * 2.0 * Radius;
end;


procedure Perimeter_Of_Square;
begin
Perimeter := 4.0 * Length_Of_Side;
end;


procedure Perimeter_Of_Rectangle;
begin
Perimeter := 2.0 * (Length + Width);
end;


begin (* This is the initialization code *)
My_Pi := 3.14159267;
end. (* of unit Perimeters *)




{ Result of execution

(A unit cannot be executed)

}


  3 Responses to “Category : Pascal Source Code
Archive   : PASTUT.ZIP
Filename : PERIMS.PAS

  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/