home *** CD-ROM | disk | FTP | other *** search
/ Power Programming / powerprogramming1994.iso / progtool / pascal / pascsrc.arc / TYPES.PAS < prev    next >
Pascal/Delphi Source File  |  1988-01-15  |  833b  |  25 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.