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

 
Output of file : REALMATH.PAS contained in archive : PASTUT.ZIP
(* Chapter 3 - Program 4 *)
program Real_Math_Demo;

var A,B,C,D : real;

begin
A := 3.234; {simply assigning a value}
B := A + 1.101; {adding a constant}
C := A + B; {summing two variables}
D := 4.234*A*B; {multiplication}
D := 2.3/B; {division}
D := A - B; {subtraction}
D := (A + B)/(12.56-B); {example of a multiple expression}
{Pascal has no expression for
raising a number to a power.
It must be done with the log and
exp functions}
{The trigonometric functions, log functions and others are
available as predefined routines.}

{It will be left up to you to print out some of the above values}
end.




{ Result of execution

(There is no output from this program )

}


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