AMT Datasouth PAL User Manual
Page 87
81
div
div
Description
Divides the next-to-top stack value by the top stack value and returns the quotient.
Usage
DividendNum DivisorNum
div
QuotientFxp
DividendNum
Integer or fixed-point. Value to divide by DivisorNum.
DivisorNum
Integer or fixed-point. Value to divide into DividendNum.
QuotientFxp
Fixed-point. Result of division. The interpreter always returns a fixed-point re-
sult regardless of the operands.
Comments
The div operator always generates a fixed-point quotient regardless of the operand types. PAL
provides the idiv operator for calculating integer quotients.
Hints
As with most computer systems, most PAL printers can perform integer calculations faster than
fixed-point calculations. Therefore, the programmer should consider using integer math whenever
possible. The idiv operator performs an integer divide rather than a fixed-point divide. As a result,
the programmer should consider using idiv instead of div whenever possible.