Well -- I usually code so the 'first clause' is my 'expected outcome' --
that is, if the PARMS(7)<102,CM> is TYPICALLY 'not empty' -- so I would do #
"" THEN myself as well..

I do it as much to express the code as the 'typical path'.  I also perceive
(although have never tested!) the "THEN" clause as being the 'lower cost'
clause to execute.  Don't know why I think that or have a reason for
thinking that -- I guess because of 'reading' the code, THEN is always the
next line without having to 'skip ahead'.

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.

-----Original Message-----
From: u2-users-boun...@listserver.u2ug.org
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of fft2...@aol.com
Sent: Wednesday, March 02, 2011 12:10 PM
To: u2-users@listserver.u2ug.org
Subject: Re: [U2] Is this worth rewriting?

In a message dated 


> >            IF PARMS(7)<102,CM>#'' THEN CUMO(M)=CUMO(M)+PARMS(7)<102,CM>
> > ELSE
> > 
> >              CUMO(M)=CUMO(M)+PARMS(12)<134,CM>
> > 
> >            END
> 


Just as a follow up, IF Not Not, is very bad style.  And parsing long and 
then short is as well.

This part should have been done as

IF PARMS(7)<102,CM>='' THEN
       CUMO(M) += PARMS(12)<134,CM>
ELSE
       CUMO(M) += PARMS(7)<102,CM>
END

Infinitely more legible.

W
Fire that programmer.
_______________________________________________
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users


_______________________________________________
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users

Reply via email to