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

  1.                              -- Chapter 3 - Programming Exercise 1
  2.  
  3. procedure Ch03_1 is
  4.  
  5.    subtype RESTRICTED_RANGE is INTEGER range 12.. 77;
  6.  
  7.    Restricted_Variable : RESTRICTED_RANGE;
  8.  
  9. begin
  10.    Restricted_Variable := 5;
  11.    Restricted_Variable := 125;
  12.    Restricted_Variable := 15 * (15 - 5);
  13. end Ch03_1;
  14.  
  15.  
  16.  
  17.  
  18. -- Result of Execution
  19.  
  20. --  (You will get an error for the executable statements, fix
  21. --   each one and observe the error at the next step.
  22.