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

  1.                               -- Chapter 6 - Programming exercise 2
  2. with Text_IO;
  3. use Text_IO;
  4.  
  5. procedure Ch07_2 is
  6.  
  7. package Long_IO is new Text_IO.Float_IO(LONG_FLOAT);
  8. use Long_IO;
  9.  
  10. package Short_IO is new Text_IO.Float_IO(SHORT_FLOAT);
  11. use Short_IO;
  12.  
  13. Long_Variable  : LONG_FLOAT;
  14. Short_Variable : SHORT_FLOAT;
  15.  
  16. begin
  17.    Put_Line("For LONG_FLOAT,");
  18.    Put(LONG_FLOAT'FIRST);
  19.    Put_Line(" is the minimum value");
  20.    Put(LONG_FLOAT'LAST);
  21.    Put_Line(" is the maximum value");
  22.  
  23.    Put_Line("For SHORT_FLOAT,");
  24.    Put(SHORT_FLOAT'FIRST);
  25.    Put_Line(" is the minimum value");
  26.    Put(SHORT_FLOAT'LAST);
  27.    Put_Line(" is the maximum value");
  28. end Ch07_2;
  29.  
  30.  
  31.  
  32.  
  33. -- Result of execution
  34.  
  35. -- For LONG_FLOAT
  36. -- ? is the minimum value
  37. -- ? is the maximum value
  38. -- For SHORT_FLOAT
  39. -- ? is the minimum value
  40. -- ? is the maximum value
  41.  
  42.  
  43.