| Introduction | MTB Statements | File System | Compiler | Applications | Reference Guide | Index |
| Language Structure | Data Division | I/O Format Division | Procedure Division | Mnemonics |
| Syntax: | FPT(numeric-argument) |
| Discussion: |
The FPT function returns the fractional portion of a
numeric-argument. The value returned by the FPT function is always a
decimal value 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 FPT function is stored in a numeric accumulator with a length and precision of 16.8. 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 INT. |
| Example: |
A = FPT(B)In the above example, the fractional portion of numeric variable B is moved to numeric variable A. For example, if B equals 27.43, then A equals .43. |