Difference between revisions of "Fact"

From SCAR Divi Manual
Jump to: navigation, search
(Created page with "==Definition== <source lang="scar" lines="false"> function Fact(i: Int64): Int64; </source> ==Availability== SCAR Divi 3.26 > Current ===Aliases=== *Factorial (SCAR Divi 3.21 >...")
 
 
Line 12: Line 12:
  
 
==Description==
 
==Description==
Returns the [http://en.wikipedia.org/wiki/Factorial factorial] of the value given by '''i'''.
+
Returns the [http://en.wikipedia.org/wiki/Factorial factorial] of the value given by '''i'''. The function does not work for values of '''i''' over 66, if the value of '''i''' is over 66 the function returns 0.
  
 
==Example==
 
==Example==

Latest revision as of 14:36, 3 July 2011

Definition

function Fact(i: Int64): Int64;

Availability

SCAR Divi 3.26 > Current

Aliases

  • Factorial (SCAR Divi 3.21 > Current)
  • Fract (SCAR Divi 3.00 > Current)

Description

Returns the factorial of the value given by i. The function does not work for values of i over 66, if the value of i is over 66 the function returns 0.

Example

begin
  WriteLn(Fact(10));
end.

Output:

3628800

See Also