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

 
Output of file : NEWREAL4.PAS contained in archive : PASTUT.ZIP
(* Chapter 3 - Program 10 *)
program New_Real_Types;

(* Note; This program will not work unless you are using *)
(* TURBO Pascal version 4.0 or 5.0 and you must *)
(* have an 80X87 Math Co-processor installed. *)
(* Select the 80X87 mode from the pull-down menus *)
(* as follows; *)
(* (v4.0) Options/Compiler/Numeric processing Hardware *)
(* (v5.0) Options/Compiler/Numeric processing 8087/80287 *)

(* Note: If you are using TURBO Pascal Version 5.0 and do *)
(* not have a Math Co_Processor, you can still run *)
(* this program by using the compiler directives as *)
(* explained on page 42 of the User's Guide. *)

var Number : real;
Small_Number : single;
Big_Number : double;
Huge_Number : extended;
Whole_Number : comp;

begin
Number := 100000000000000000000000000.0;
Small_Number := 100000000000000000000000000.0;
Big_Number := 100000000000000000000000000.0;
Huge_Number := 100000000000000000000000000.0;
Whole_Number := 1000000000000000000.0;

Writeln('Number = ',Number :40:3);
Writeln('Small_Number = ',Small_Number:40:3);
Writeln('Big_Number = ',Big_Number :40:3);
Writeln('Huge_Number = ',Huge_Number :40:3);
Writeln('Whole_Number = ',Whole_Number:40:3);
end.




{ Result of execution

Number = 99999999999985900100000000.000
Small_Number = 100000002537764290000000000.000
Big_Number = 100000000000000005000000000.000
Huge_Number = 100000000000000000000000000.000
Whole_Number = 1000000000000000000.000

}


  3 Responses to “Category : Pascal Source Code
Archive   : PASTUT.ZIP
Filename : NEWREAL4.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/