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

  1. { INTEGER VERSION OF FACTORIAL: }
  2. function fact2(n : integer) : integer;
  3. begin
  4.  if n < 1 then
  5.   fact2 := 1
  6.    else
  7.     fact2 := n * fact2(pred(n))
  8. end;
  9.  
  10.