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

 
Output of file : TYPES.PAS contained in archive : PASTUT.ZIP
(* Chapter 6 - Program 3 *)
program Example_Of_Types;

type Array_Def = array[12..25] of integer;
Char_Def = array[0..27] of char;
Real_Array = array[-17..42] of real;
Dog_Food = array[1..6] of boolean;
Airplane = array[1..12] of Dog_Food;
Boat = array[1..12,1..6] of boolean;

var Index,Counter : integer;
Stuff : Array_Def;
Stuff2 : Array_Def;
Puppies : Airplane;
Kitties : Boat;

begin (* main program *)
for Index := 1 to 12 do
for Counter := 1 to 6 do begin
Puppies[Index,Counter] := TRUE;
Kitties[Index,Counter] := Puppies[Index,Counter];
end;
Writeln(Puppies[2,3]:7,Kitties[12,5]:7,Puppies[1,1]:7);
end. (* of main program *)




{ Result of execution

TRUE TRUE TRUE

}


  3 Responses to “Category : Pascal Source Code
Archive   : PASTUT.ZIP
Filename : TYPES.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/