Hello,
The value range of type <b>P</b> fields depends on their length and the number of decimal places. P fields can be <b>1 to 16</b> bytes long, with two decimal digits packed into each byte, and one decimal digit and the sign packed into the last byte. There can be up to <b>14</b> decimal places. Auxiliary fields for intermediate results are always <b>16 bytes</b> long and can thus hold up to 31 decimal digits. To ensure that the decimal point is correctly calculated, you should always set the program attribute "fixed point arithmetic". Otherwise, all numbers are specified as integers and all intermediate results for the next integer are rounded. If "fixed point arithmetic" is not set, the decimal places defined for the number only appear when outputting with WRITE.
Fixed point arithmetic is decimal arithmetic and is similar to using a pocket calculator or calculating with paper and pencil.
Type <b>P</b> is typically used for sizes, lengths, weights and sums of money.
Reward if helpful,
Regards,
LIJO
Add comment