|
I'm still comfortable with: wAmt = wFee * (%int((Amt1 - .001) / 500.00) + 1) This WILL work. The requirement is that .001 must be smaller than the smallest possible increment in Amt1. Joe > From: Booth Martin > > Here is the code I tested and seems to work: > > if wIncrement <> *zero > eval wAmt = wFee * > %div(%int(Amt1): %int(wIncrement)) > if %rem(%int(Amt1): %int(wIncrement)) <> 0 > eval wAmt = wAmt + wFee > endif > endif > > Joe, %div & %rem require a whole number, with zero decimal places if I > understand the manual correctly. Hence my use of the %int bif, as was > pointed out originally by several brighter-than-me people. > > The idea of using the delta, 1 in this instance, seems to me like it'd > work but I haven't tested it.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.