home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Power-Programmierung
/
CD1.mdf
/
pascal
/
interpre
/
p_pascal
/
samples
/
fact1.p
< prev
next >
Encoding:
Amiga
Atari
Commodore
DOS
FM Towns/JPY
Macintosh
Macintosh JP
NeXTSTEP
RISC OS/Acorn
Shift JIS
UTF-8
Wrap
Text File
|
1989-11-19
|
242 b
|
12 lines
{ SAMPLE INCLUDE FILE FOR FACTORIAL.PAS: }
{ IN STANDARD ISO PASCAL, PRED & SUCC }
{ ARE NOT DEFINED FOR REALS: }
function fact1(n : real) : real;
begin
if n < 1.0 then
fact1 := 1.0
else
fact1 := n * fact1(n - 1.0)
end;