floor

Returns the floor of the number represented in number.

An error occurs if number is not a valid number.

Syntax

   floor(number)
Table 1. floor parameters
Parameter Type Description
number Decimal number Any decimal number

Returns

A string containing the floor of the number, or null if an error occurs.

Example

In this example, the result of floor is "-20".

   <field sid="floorTestField">
      <label>Test floor()</label>   
      <format>
         <datatype>string</datatype>
         <constraints>
            <mandatory>on</mandatory>
         </constraints>
      </format>
      <value compute="floor('-19.6')"></value>
   </field>