home *** CD-ROM | disk | FTP | other *** search
/ Chip 1995 March / CHIP3.mdf / programm / prog2 / answers / ch03_2.ada < prev    next >
Encoding:
Text File  |  1991-07-01  |  440 b   |  24 lines

  1.                            -- Chapter 3 - Programming Exercise 2
  2.  
  3. procedure Ch03_2 is
  4.  
  5.    Index, Count : INTEGER;
  6.    type NEW_INT is range 0..1200;
  7.    New_Index, New_Count : NEW_INT;
  8.  
  9. begin
  10.    Index := 100;
  11.    New_Index := 100;
  12.    Index := New_Index;
  13.    Count := Index + New_Index;
  14.    New_Count := Index + New_Index;
  15. end Ch03_2;
  16.  
  17.  
  18.  
  19.  
  20. -- Result of execution
  21.  
  22. --  (This has compilation errors in lines 12, 13, and 14.)
  23.  
  24.