Category : Pascal Source Code
Archive   : PASTUT.ZIP
Filename : NEWINT4.PAS

 
Output of file : NEWINT4.PAS contained in archive : PASTUT.ZIP
(* 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

}


  3 Responses to “Category : Pascal Source Code
Archive   : PASTUT.ZIP
Filename : NEWINT4.PAS

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/