home *** CD-ROM | disk | FTP | other *** search
- -- Chapter 11 - Program 5
- with Text_IO;
- use Text_IO;
-
- procedure CharInt is
-
- package Int_IO is new Text_IO.Integer_IO(INTEGER);
- use Int_IO;
-
- Char : CHARACTER;
- Index : INTEGER;
- Stuff : array(0..25) of CHARACTER;
-
- begin
- Char := 'A';
- Index := 5 + CHARACTER'POS(Char);
- Put(Index);
- Char := CHARACTER'VAL(Index);
- Put(Char);
-
- New_Line;
- Stuff(21) := 'X';
- Index := 2 + CHARACTER'POS(Stuff(21));
- Put(Index);
- Stuff(0) := CHARACTER'VAL(Index);
- Put(Stuff(0));
-
- end CharInt;
-
-
-
-
- -- Result of execution
-
- -- 70F
- -- 90Z
-
-