Fact(Value: Integer): Double;
Fact(Value: integer): double;
Value. A number, for which factorial is calculated.
The Fact method returns a number factorial.
The Value parameter value must belong to the [1;170] interval.
To execute the example, add a link to the MathFin system assembly.
Sub UserProc;
Var
r: Double;
Begin
r := Math.Fact(5);
Debug.WriteLine(r);
End Sub UserProc;
After executing the example the console window displays the factorial number equal to 120.
The requirements and result of the Fore.NET example execution match with those in the Fore example.
Imports Prognoz.Platform.Interop.MathFin;
…
Public Shared Sub Main(Params: StartParams);
Var
r: double;
Math: MathClass = New MathClass();
Begin
r := Math.Fact(5);
System.Diagnostics.Debug.WriteLine(r);
End Sub;
See also: