Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- CA-Clipper Tools . Books 1-3 - <b>fact()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 FACT()
 Computes the factorial
------------------------------------------------------------------------------
 Syntax

     FACT(<nValue>) --> nFactorial

 Argument

     <nValue>  Designates a value between 0 and 21.

 Returns

     FACT() returns the factorial of the specified value.

 Description

     FACT() computes the factorial of a value in the range of 0 to 21.  Since
     results for factorials over 21 are too large, the function returns -1 to
     indicate an error.

 Examples

     Show some factorials:

     ? FACT(1)         // Result: 1
     ? FACT(5)         // Result: 120
     ? FACT(21)        // Result: 51090942171709440000
     ? FACT(25)        // Result: -1 (Value too large !)
     ? FACT(0)         // Function returns 1


Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson