The += I completely agree with. No arguments on that point at all. But # "" or = "" ... that's the exact same amount of code! ;-)
And this example seems to point that ONE or the other is needed. That is, you could not change their code IF PARMS(7)<102,CM> # '' THEN CUMO(M)=CUMO(M)+PARMS(7)<102,CM> END ELSE CUMO(M)=CUMO(M)+PARMS(12)<134,CM> END To be a SHORTER: IF PARMS(7)<102,CM> THEN CUMO(M)=CUMO(M)+PARMS(12)<134,CM> END ELSE CUMO(M)=CUMO(M)+PARMS(7)<102,CM> END As what if PARMS(7)<102,CM> = 0? 0 would 'fail' the 2nd test, but is 'not blank'. So you cannot 'shorten' the clause at all. It either has to be = "" or # "" in this case (not knowing anything about the data). My point was that someone said you should NEVER say '# THEN' And I will not dispute this logic could be done with CASE statements - but again, that was not the point I'm trying to delve into more deeply. DW -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Steve Romanow Sent: Wednesday, March 02, 2011 12:40 PM To: U2 Users List Subject: Re: [U2] Is this worth rewriting? On 3/2/2011 1:34 PM, David Wolverton wrote: > So I'm curious why it would that be a bad idea to say ' # "" THEN'? Is > there actually any extra 'overhead'? Or is this a 'preference' issue? > Myself, I actually think of it as being 'better documented' explaining how I > think the average transaction should progress (usually taking the "THEN" > statements.) > > Wondering why that is a 'bad thing'??? > > David W.s IMO, less code is better code as long as it doesn't involve magic. I will always use += and drop the #''. _______________________________________________ U2-Users mailing list [email protected] http://listserver.u2ug.org/mailman/listinfo/u2-users _______________________________________________ U2-Users mailing list [email protected] http://listserver.u2ug.org/mailman/listinfo/u2-users
