home *** CD-ROM | disk | FTP | other *** search
- (* Chapter 3 - Program 9 *)
- program New_Integer_Types;
-
- var Index : integer;
- Big_int : longint;
- Small_int : shortint;
- Pos_int : word;
-
- begin
- Index := MaxInt;
- Small_int := 127;
- Pos_int := Index + 256 * Small_int;
- Big_int := 1000 * MaxInt + 1234;
-
- Writeln('Index = ',Index:12);
- Writeln('Small_int = ',Small_int:12);
- Writeln('Pos_int = ',Pos_int:12);
- Writeln('Big_int = ',Big_int:12);
- Writeln;
-
- Big_int := 1000 * Index + 1234;
- Writeln('Big_int = ',Big_int:12);
- end.
-
-
-
-
- { Result of execution
-
- Index = 32767
- Small_Int = 127
- Pos_Int = 65279
- Big_Int = 32768234
-
- Big_Int = 234
-
- }