Parameters
X—positive integer constant, or a field (or indirect reference to a field), a variable, or a function or expression that can be converted to a positive, whole (integer) number.
The result of $fact must be less than 1 * 10 9999 , which means that X must be positive and less than 3249.
Return Values
Calculated factorial of X.
If an error occurs, $procerror contains a negative value that identifies the exact error.
Value | Error constant | Meaning |
---|---|---|
-1204 | <UPROCERR_NEGATIVE> | Negative value not allowed. |
-1206 | <UPROCERR_INTEGER> | Not an integer. |
-1208 | <UPROCERR_OVERFLOW> | Overflow. |
Use
Allowed in all component types.
Using $fact
The following example returns the factorial of 13:
vFactorial = $fact(13)