home *** CD-ROM | disk | FTP | other *** search
/ Collection of Hack-Phreak Scene Programs / cleanhpvac.zip / cleanhpvac / PASSRC.ZIP / TYPES.PAS < prev    next >
Pascal/Delphi Source File  |  1991-02-04  |  895b  |  34 lines

  1.                                 (* Chapter 6 - Program 3 *)
  2. program Example_Of_Types;
  3.  
  4. type Array_Def  = array[12..25] of integer;
  5.      Char_Def   = array[0..27] of char;
  6.      Real_Array = array[-17..42] of real;
  7.      Dog_Food   = array[1..6] of boolean;
  8.      Airplane   = array[1..12] of Dog_Food;
  9.      Boat       = array[1..12,1..6] of boolean;
  10.  
  11. var Index,Counter      : integer;
  12.     Stuff              : Array_Def;
  13.     Stuff2             : Array_Def;
  14.     Puppies            : Airplane;
  15.     Kitties            : Boat;
  16.  
  17. begin  (* main program *)
  18.    for Index := 1 to 12 do
  19.       for Counter := 1 to 6 do begin
  20.          Puppies[Index,Counter] := TRUE;
  21.          Kitties[Index,Counter] := Puppies[Index,Counter];
  22.       end;
  23.    Writeln(Puppies[2,3]:7,Kitties[12,5]:7,Puppies[1,1]:7);
  24. end.  (* of main program *)
  25.  
  26.  
  27.  
  28.  
  29. { Result of execution
  30.  
  31.    TRUE   TRUE   TRUE
  32.  
  33. }
  34.