home *** CD-ROM | disk | FTP | other *** search
- -- Chapter 6 - Program 4
- with Text_IO;
- use Text_IO;
-
- procedure IncrInt is
-
- Index : INTEGER;
-
- begin
-
- Index := 13;
- Index := INTEGER'POS(Index); -- Still 13
- Index := INTEGER'VAL(Index); -- Still 13
- Index := INTEGER'SUCC(Index); -- Incremented to 14
- Index := INTEGER'PRED(Index); -- Decremented to 13
-
- Index := Index + 1; -- preferred method of incrementing
-
- end IncrInt;
-
-
-
-
- -- Result of execution
-
- -- (No output data from this program.)
-
-