INTF(arg)
Returns the integer portion of the argument. The integer value is defined by truncating the decimal portion of the number.
Statement |
Assigned Value |
A=INTF(3.1) |
A equals 3 |
NOTE: Because this function truncates the decimal part of a number, it
rounds down. You can use this function to round to the nearest integer by adding
an appropriate tolerance. The following are some examples of adding
tolerances.
A=INTF(myreal + 1)
or
A=INTF(myreal + 1.0e-10)