home *** CD-ROM | disk | FTP | other *** search
/ Collection of Hack-Phreak Scene Programs / cleanhpvac.zip / cleanhpvac / PASSRC.ZIP / EXTINT.PAS < prev    next >
Pascal/Delphi Source File  |  1991-02-04  |  757b  |  38 lines

  1.                                 (* Chapter 3 - Program 9 *)
  2. program Extended_Integer_Types;
  3.  
  4. var Index     : integer;
  5.     Big_int   : longint;
  6.     Small_int : shortint;
  7.     Pos_int   : word;
  8.  
  9. begin
  10.    Index := MaxInt;
  11.    Small_int := 127;
  12.    Pos_int := Index + 256 * Small_int;
  13.    Big_int := 1000 * MaxInt + 1234;
  14.  
  15.    Writeln('Index     = ',Index:12);
  16.    Writeln('Small_int = ',Small_int:12);
  17.    Writeln('Pos_int   = ',Pos_int:12);
  18.    Writeln('Big_int   = ',Big_int:12);
  19.    Writeln;
  20.  
  21.    Big_int := 1000 * Index + 1234;
  22.    Writeln('Big_int   = ',Big_int:12);
  23. end.
  24.  
  25.  
  26.  
  27.  
  28. { Result of execution
  29.  
  30. Index     =        32767
  31. Small_Int =          127
  32. Pos_Int   =        65279
  33. Big_Int   =     32768234
  34.  
  35. Big_Int   =          234
  36.  
  37. }
  38.