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

  1.                                        -- Chapter 3 - Program 1
  2. with Text_IO;
  3. use Text_IO;
  4.  
  5. procedure OneInt is
  6.  
  7.    package Int_IO is new Text_IO.Integer_IO(INTEGER);
  8.    use Int_IO;
  9.  
  10.    Index : INTEGER;           -- A simple Integer type
  11.  
  12. begin
  13.  
  14.    Index := 23;
  15.    Put("The value of Index is");
  16.    Put(Index);                -- The default field width is 6 columns
  17.    New_Line;
  18.    Index := Index + 12;
  19.    Put("The value of Index is");
  20.    Put(Index,8);
  21.    New_Line;
  22.  
  23. end OneInt;
  24.  
  25.  
  26.  
  27.  
  28. -- Result of execution
  29.  
  30. -- The value of Index is    23
  31. -- The value of Index is      35
  32.  
  33.