home *** CD-ROM | disk | FTP | other *** search
- -- Chapter 9 - Program 4
- with Text_IO;
- use Text_IO;
-
- procedure Automatc is
-
- package Int_IO is new Text_IO.Integer_IO(INTEGER);
- use Int_IO;
-
- Dog, Cat : INTEGER;
- Pig, Cow : FLOAT;
-
- begin
-
- for Index in 1..10 loop
- Put("The value of Index is");
- Put(Index,3);
-
- declare
- START : constant INTEGER := Index;
- STOP : constant INTEGER := START + 5;
- Count_Stuff : INTEGER;
- begin
- Count_Stuff := START + STOP + Index + 222;
- Put(" --->");
- for Index in START..STOP loop
- Put(Index,5);
- end loop;
- end;
-
- New_Line;
- end loop;
-
- end Automatc;
-
-
-
-
- -- Result of execution
-
- -- The value of Index is 1 ---> 1 2 3 4 5 6
- -- The value of Index is 2 ---> 2 3 4 5 6 7
- -- The value of Index is 3 ---> 3 4 5 6 7 8
- -- The value of Index is 4 ---> 4 5 6 7 8 9
- -- The value of Index is 5 ---> 5 6 7 8 9 10
- -- The value of Index is 6 ---> 6 7 8 9 10 11
- -- The value of Index is 7 ---> 7 8 9 10 11 12
- -- The value of Index is 8 ---> 8 9 10 11 12 13
- -- The value of Index is 9 ---> 9 10 11 12 13 14
- -- The value of Index is 10 ---> 10 11 12 13 14 15
-
-