|
Maybe we should make this clearer cause C Eval Z = ((1 + (SSFY - YY)) * 12) - 11 C Eval Z = 1 + ((SSFY - YY) * 12) Both Equal out to 1 so multiply & divide before add & subtract starting from inner most parenthesis to outer most parenthesis Thanks Peter Again it's been a long weeeeeek :) Bill Hopkins "Peter Dow" <maillist@xxxxxxxxxxxxxxx> Sent by: rpg400-l-bounces@xxxxxxxxxxxx 08/20/2003 12:07 PM Please respond to RPG programming on the AS400 / iSeries To: "RPG programming on the AS400 / iSeries" <rpg400-l@xxxxxxxxxxxx> cc: Subject: Re: How to do qualified? Hi Bill, No, rules of operator precedencej: multiply & divide before add & subtract. eval Z = 1 + (00 - 00) * 12 z = 1 + (00) * 12 z = 1 + 0 z = 1 To make it clearer, I should've used parenthesis: if SSCTRY = CC eval Z = 1 + ((SSFY - YY) * 12) endif hth, Peter Dow Dow Software Services, Inc. 909 793-9050 voice 909 793-4480 fax 909 522-3214 cell From: "Bill Hopkins" > Will maybe I'm reading wrong but , we have 48 month buckets three years > prior plus current year. YY has been set to 00 for 2000 if I take lets > say a record that has a date of 2000 coming in and > > eval Z = 1 + (00 - 00) * 12 > > then > z = 1 + (00) * 12 > z = 1 * 12 > z = 12 > > that starts in second year 12 - 24 also not sure but should it not be > contain in (add) or does RPG know + goes before * > > eval Z = (1 + (00 - 00)) * 12 > > so addition happens first oooohhh wait > > thanks cause I am now thinking along these lines, how about this > > eval Z = (1 + (SSFY - YY) * 12)) - 11 cool thanks for the "brain kick" --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.510 / Virus Database: 307 - Release Date: 8/15/2003 _______________________________________________ This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list To post a message email: RPG400-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/mailman/listinfo/rpg400-l or email: RPG400-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/rpg400-l.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 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.