Product Site

5.1.7.66. floor

Returns the largest integer not greater than the receiving string value. The receiving string value is first rounded according to standard Rexx rules, as though the operation receiving_string+0 had been carried out. The floor is then calculated from that result and returned. The result is never in exponential form. If there are no nonzero digits in the result, any minus sign is removed.
Example 5.103. String class — floor method
2~floor               -->    2
'-2'~floor            -->    -2
12.3~floor            -->    12
'-12.3'~floor         -->    -13

Note

The number is rounded according to the current setting of NUMERIC DIGITS if necessary, before the method processes it.