MAX - Maximum#

Compare Operand 2 and 3; store the larger value of the two operands in Operand 1

Example: Give the employee a bonus (stored in PC 50) based on 1% of Gross Earnings or $200.00, whichever is higher.

LineCMDOTOperand 1OPEROTOperand2OTOperand3If Goto Else GoTo
00010 LET V TOTAL GROSS ADD EY GROSS PAY EC GROSS PAY 00020
00020LET V 1 PERCENT PRC V TOTAL GROSS N 1 00030
00030 LET PC 50 MAX V 1 PERCENT N 200 99999
99999 EXIT 99999