home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD1.mdf / pascal / interpre / p_pascal / samples / fact1.p < prev    next >
Encoding:
Text File  |  1989-11-19  |  242 b   |  12 lines

  1. { SAMPLE INCLUDE FILE FOR FACTORIAL.PAS: }
  2. { IN STANDARD ISO PASCAL, PRED & SUCC }
  3. { ARE NOT DEFINED FOR REALS: }
  4. function fact1(n : real) : real;
  5. begin
  6.  if n < 1.0 then
  7.   fact1 := 1.0
  8.    else
  9.     fact1 := n * fact1(n - 1.0)
  10. end;
  11.  
  12.