Actually, A:B:C NE '' THEN CUMM(M) = A+B+C 

doesn't slow anything down  compared to?

If A#"" OR B#"" OR C#"" THEN CUMM(M) = A+B+C

Or just CUMM(M) = A+B+C   (with no IF)

Depending on whether it's expected that the majority of times A,B, or C
   will have something or won't have a value will determine which is
   faster.

By that I mean....

If you expect A,B, or C to have a value rarely, then it would be
   faster to concatenate and check for "", otherwise ADD

If you expect A,B, or C to have a value most of the time, then it would
   be faster to just CUMM(M) = A+B+C   (no concat, no IF)

But I don't think that A:B:C NE "" is slower than A#"" or B#"" or C#"" 

There is another tried and true way to make it perfectly clear what a program
does and what the business rules are, without changing the program at all....

By putting in blocks of commenting that describe what/why is going on

George

> -----Original Message-----
> From: [email protected] [mailto:u2-users-
> [email protected]] On Behalf Of Rex Gozar
> Sent: Friday, March 04, 2011 9:09 AM
> To: U2 Users List
> Subject: Re: [U2] Is this worth rewriting?
> 
> Sorry, but structures like:
> 
> IF A:B:C NE '' THEN CUM(M) = A+B+C
> 
> (concatenating variables as a string, then performing numeric
> operations on them) slows down the comprehension process.  And for
> what benefit?  To me, that's just a lazy programmer that doesn't want
> to type a few extra keystrokes.
> 
_______________________________________________
U2-Users mailing list
[email protected]
http://listserver.u2ug.org/mailman/listinfo/u2-users

Reply via email to