home *** CD-ROM | disk | FTP | other *** search
- -- Chapter 6 - Programming exercise 1
- with Text_IO;
- use Text_IO;
-
- procedure Ch07_1 is
-
- package Long_IO is new Text_IO.Integer_IO(LONG_INTEGER);
- use Long_IO;
-
- package Short_IO is new Text_IO.Integer_IO(SHORT_INTEGER);
- use Short_IO;
-
- Long_Variable : LONG_INTEGER;
- Short_Variable : SHORT_INTEGER;
-
- begin
- Put_Line("For LONG_INTEGER,");
- Put(LONG_INTEGER'FIRST);
- Put_Line(" is the minimum value");
- Put(LONG_INTEGER'LAST);
- Put_Line(" is the maximum value");
-
- Put_Line("For SHORT_INTEGER,");
- Put(SHORT_INTEGER'FIRST);
- Put_Line(" is the minimum value");
- Put(SHORT_INTEGER'LAST);
- Put_Line(" is the maximum value");
- end Ch07_1;
-
-
-
-
- -- Result of execution
-
- -- For LONG_INTEGER
- -- -2147483648 is the minimum value
- -- 2147483647 is the maximum value
- -- For SHORT_INTEGER
- -- -128 is the minimum value
- -- 127 is the maximum value
-
-
-