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

  1.                           -- Chapter 14 - Programming exercise 1
  2. with Text_IO;
  3. use Text_IO;
  4.  
  5. procedure CH14_1 is
  6.  
  7.    package Int_IO is new Text_IO.Integer_IO(INTEGER);
  8.    use Int_IO;
  9.  
  10.    One_Char : CHARACTER;
  11.  
  12. begin
  13.  
  14.    Put_Line("Input characters to display, enter Q to stop.");
  15.  
  16.    loop       -- Read one character at a time and display it
  17.       Get(One_Char);
  18.       Put(One_Char);
  19.       exit when One_Char = 'Q';
  20.    end loop;
  21.    New_Line(2);
  22.  
  23. end CH14_1;
  24.  
  25.  
  26.  
  27.  
  28. -- Result of execution
  29.  
  30. -- (The output depends on the input.)
  31.