Again, your response is out of sequence as so is mine. I see the back slashes today but replied yesterday. Maybe the forum is a better idea. Mark Johnson ----- Original Message ----- From: "Jerry Banker" <[EMAIL PROTECTED]> To: <[email protected]> Sent: Monday, November 26, 2007 8:40 AM Subject: RE: [U2] Good Practice?
> In the case he used it will not show a false positive because he > enclosed the F200.SCHEME.CODE in "\". > > > -----Original Message----- > > From: MAJ Programming [mailto:[EMAIL PROTECTED] > > Sent: Sunday, November 25, 2007 10:03 PM > > To: [email protected] > > Subject: Re: [U2] Good Practice? > > > > I find this kind of evolved junk a lot. There's one caveat that you > should > > include: > > > > TEST = '\AF1\CK1\CK2\H\LHC\MP\NU1\NU2\TK1\TK2\' > > CONVERT "\" TO CHAR(254) IN TEST > > LOCATE F200.SCHEME.CODE IN TEST SETTING FOUND THEN ELSE............ > > > > While actual mileage may differ, when having a lookup table and using > INDEX, > > the value of F200.SCHEME.CODE of CK will trigger a false positive. > > > > I like to boil down complex boolean expressions into readable words as > well. > > Somehow causes clarity, especially with very verbose variable names. > > > > MJ > > ----- Original Message ----- > > From: "Keith Johnson (DSLWN)" <[EMAIL PROTECTED]> > > To: <[email protected]> > > Sent: Sunday, November 25, 2007 3:52 PM > > Subject: [U2] Good Practice? > > > > > > > Here's an example of how I rewrote some code. > > > > > > Old version > > > 284: * IF F200.SCHEME.CODE = "CK1" OR F200.SCHEME.CODE = > "CK2" > > > OR F200.SCHEME.CODE = "NU1" OR F200.SCHEME.CODE = "NU2" OR > > > F200.SCHEME.CODE = "TK1" OR F200.SCHEME.CODE = "TK2" OR > > F200.SCHEME.CODE > > > = "GS1" OR F200.SCHEME.CODE = "JM" OR F200.SCHEME.CODE = "MP3" OR > > > F200.SCHEME.CODE = "LHC" OR F200.CALC.CODE = "H" OR > > F500.S91.ANNUITY.SEQ > > > + 0 >= 2 OR F500.S48.ANNUITY.SEQ + 0 >= 2 OR F200.SCHEME.CODE = > "AF1" > > OR > > > F200.SCHEME.CODE = "MP" THEN ; *002 > > > 285: IF F200.SCHEME.CODE = "CK1" OR F200.SCHEME.CODE = > "CK2" OR > > > F200.SCHEME.CODE = "NU1" OR F200.SCHEME.CODE = "NU2" OR > > F200.SCHEME.CODE > > > = "TK1" OR F200.SCHEME.CODE = "TK2" OR F200.SCHEME.CODE = "LHC" OR > > > F200.CALC.CODE = "H" OR F500.S91.ANNUITY.SEQ + 0 >= 2 OR > > > F500.S48.ANNUITY.SEQ + 0 >= 2 OR F200.SCHEME.CODE = "MP" OR > > > F200.SCHEME.CODE = "AF1" THEN ; *002*003 > > > > > > New version > > > 261: THAT = @TRUE > > > 262: * TEST = > > '\AF1\CK1\CK2\GS1\H\JM\LHC\MP\MP3\NU1\NU2\TK1\TK2\' > > > 263: TEST = '\AF1\CK1\CK2\H\LHC\MP\NU1\NU2\TK1\TK2\' > > > 264: IF INDEX(TEST,'\':F200.SCHEME.CODE:'\',1) THEN THAT = > > > @FALSE > > > 265: > > > 266: IF F500.S91.ANNUITY.SEQ + 0 GE 2 THEN THAT = @FALSE > > > 267: IF F500.S48.ANNUITY.SEQ + 0 GE 2 THEN THAT = @FALSE > > > > > > I think the new version is easier to maintain (well I would say > that), > > > but the code itself is more complex; which is rather interesting. > > > > > > > > > Regards, Keith > > > ------- > > > u2-users mailing list > > > [email protected] > > > To unsubscribe please visit http://listserver.u2ug.org/ > > ------- > > u2-users mailing list > > [email protected] > > To unsubscribe please visit http://listserver.u2ug.org/ > ------- > u2-users mailing list > [email protected] > To unsubscribe please visit http://listserver.u2ug.org/ ------- u2-users mailing list [email protected] To unsubscribe please visit http://listserver.u2ug.org/
