Introduction | Language Structure | IB Statements | File System | Comet 32 Runtime | Index |
| Syntax: | INT(numeric-argument) |
| Discussion: |
The INT function returns the integer portion of a numeric-argument.
The value returned by the INT function is always a
whole number (integer) and always carries the same sign as the
numeric-argument.
The numeric-argument may be a numeric constant, a single-element numeric variable, a numeric array element, a numeric expression, or a numeric function. The intermediate result of the INT function is stored in a numeric accumulator with a length and precision of 16.0. If this intermediate result is then moved to a receiving numeric variable, its precision is automatically adjusted to the defined precision of that variable. Also see FPT. |
| Example: |
A = INT(B)In the above example, the integer portion of numeric variable B is moved to numeric variable A. For example, if B equals 27.43, then A equals 27. |