fact

Returns the factorial value of the integer represented in integer.

An error occurs if integer is negative.

Syntax

   fact(number)
Table 1. fact parameters
Parameter Type Description
integer Integer Any non-negative number

Returns

A string containing the factorial of the integer, or null if an error occurs.

Example

In this example, the result of fact is "40320".

   <field sid="factTestField">
      <label>Test fact()</label>
      <format>
         <datatype>string</datatype>
         <constraints>
            <mandatory>on</mandatory>
         </constraints>
      </format>
      <value compute="fact('8')"></value>
   </field>