Re: [U2] Case Statement with only two cases... or for that matter... one case

2012-04-25 Thread Keith Johnson [DATACOM]
Hi Will, As I said, I don't use it myself, but a reason one might use it is that one can easily cut and paste (or include) logic. For example: --- LOCKED put some generic logic here END --- regards, Keith WJohnson wrote: Why the extra lines? Why not just

Re: [U2] Case Statement with only two cases... or for that matter... one case

2012-04-23 Thread Keith Johnson [DATACOM]
I prefer the layout of IF A = TEST THEN GOSUB DO.SOMETHING ;* Say why ELSE GOSUB DO.SOMETHING.ELSE ;* The reason However, here is a form that's rarely used, but does work. IF A = TEST THEN ;* say why in a long-winded manner GOSUB DO.SOMETHING END

Re: [U2] Case Statement with only two cases... or for that matter... one case

2012-04-23 Thread Wjhonson
;* the reasoning behind the reason GOSUB DO.SOMETHING.ELSE END -Original Message- From: Keith Johnson [DATACOM] keith.john...@datacom.co.nz To: 'u2-users@listserver.u2ug.org' u2-users@listserver.u2ug.org Sent: Mon, Apr 23, 2012 5:44 pm Subject: Re: [U2] Case Statement with only two cases

Re: [U2] Case Statement with only two cases... or for that matter... one case

2012-04-22 Thread Phil Walker
. To: u2-users@listserver.u2ug.org Subject: Re: [U2] Case Statement with only two cases... or for that matter... one case Well, I prefer: IF A = TEST THEN GOSUB DO.SOMETHING ;* Say why END ELSE GOSUB DO.SOMETHING.ELSE ;* The reason END IMO

Re: [U2] Case Statement with only two cases... or for that matter... one case

2012-04-21 Thread Mecki Foerthmann
Well, I prefer: IF A = TEST THEN GOSUB DO.SOMETHING ;* Say why END ELSE GOSUB DO.SOMETHING.ELSE ;* The reason END IMO much more readable - because you see immediately that is is a conditional branching. It is also easier maintainable if you want to add

Re: [U2] Case Statement with only two cases... or for that matter... one case

2012-04-21 Thread dennis bartlett
@Mecki.. What is your editor of choice, ie can you get it to indent 1 space? I've always been a standard FORMAT in ED fella, but the site I've just joined doesn't want that, code must start right up against the edge, have 2 space indenting.. So hard to not instinctively FORMAT, equally hard to

Re: [U2] Case Statement with only two cases... or for that matter... one case

2012-04-21 Thread Larry Hiscock
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of dennis bartlett Sent: Saturday, April 21, 2012 4:06 PM To: U2 Users List Subject: Re: [U2] Case Statement with only two cases... or for that matter... one case @Mecki.. What is your editor of choice, ie can you get it to indent 1 space? I've

Re: [U2] Case Statement with only two cases... or for that matter... one case

2012-04-20 Thread Symeon Breen
...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Bill Brutzman Sent: 19 April 2012 22:42 To: U2 Users List Subject: Re: [U2] Case Statement with only two cases... or for that matter... one case The initial example was close to a good start... something like

Re: [U2] Case Statement with only two cases... or for that matter... one case

2012-04-20 Thread Wjhonson
You just want all the jobs to yourself :) -Original Message- From: Symeon Breen syme...@gmail.com To: 'U2 Users List' u2-users@listserver.u2ug.org Sent: Fri, Apr 20, 2012 1:45 am Subject: Re: [U2] Case Statement with only two cases... or for that matter... one case Both read exactly

Re: [U2] Case Statement with only two cases... or for that matter... one case

2012-04-20 Thread Kate Stanton
Rather than: BEGIN CASE CASE A = TEST; GOSUB DO.SOMETHING CASE 1; GOSUB DO.SOMETHING.ELSE END CASE or IF A = TEST THEN GOSUB DO.SOMETHING ELSE GOSUB DO.SOMETHING.ELSE I prefer: IF A = TEST THEN GOSUB DO.SOMETHING ;* Say why ELSE GOSUB DO.SOMETHING.ELSE

Re: [U2] Case Statement with only two cases... or for that matter... one case

2012-04-19 Thread Bill Brutzman
The case statement has a huge advantage in what really matters... human readability... that is the point. From readability follows... reliability, maintainability, and testability... better, cleaner, safer software. An irony is that while the if statement... is the cornerstone of all

Re: [U2] Case Statement with only two cases... or for that matter... one case

2012-04-19 Thread Wjhonson
Explain more what you mean by saying the if is problematic and obsolete ? -Original Message- From: Bill Brutzman bi...@hkmetalcraft.com To: U2 Users List u2-users@listserver.u2ug.org Sent: Thu, Apr 19, 2012 1:35 pm Subject: Re: [U2] Case Statement with only two cases

Re: [U2] Case Statement with only two cases... or for that matter... one case

2012-04-19 Thread Bill Brutzman
-users-boun...@listserver.u2ug.org] On Behalf Of Wjhonson Sent: Thursday, April 19, 2012 4:57 PM Subject: Re: [U2] Case Statement with only two cases... or for that matter... one case Explain more what you mean by saying the if is problematic and obsolete

Re: [U2] Case Statement with only two cases... or for that matter... one case

2012-04-19 Thread Wjhonson
Give an example of, with what you would replace the If Then Else -Original Message- From: Bill Brutzman bi...@hkmetalcraft.com To: U2 Users List u2-users@listserver.u2ug.org Sent: Thu, Apr 19, 2012 2:26 pm Subject: Re: [U2] Case Statement with only two cases... or for that matter

Re: [U2] Case Statement with only two cases... or for that matter... one case

2012-04-19 Thread Bill Brutzman
-users@listserver.u2ug.org Subject: Re: [U2] Case Statement with only two cases... or for that matter... one case Give an example of, with what you would replace the If Then Else ___ U2-Users mailing list U2-Users@listserver.u2ug.org http

Re: [U2] Case Statement with only two cases... or for that matter... one case

2012-04-19 Thread George Gallen
: [U2] Case Statement with only two cases... or for that matter... one case The initial example was close to a good start... something like... If XX then gosub YY else gosub ZZ Replaced by Begin case Case XX ; gosub YY Case 1

Re: [U2] Case Statement with only two cases... or for that matter... one case

2012-04-19 Thread Danny Ruckel
To: U2 Users List Subject: Re: [U2] Case Statement with only two cases... or for that matter... one case The initial example was close to a good start... something like... If XX then gosub YY else gosub ZZ Replaced by Begin case Case XX ; gosub YY

Re: [U2] Case Statement with only two cases... or for that matter... one case

2012-04-19 Thread dennis bartlett
Well, I wrote a proggie to process source code and break long IF/THEN/ELSE into IF ... THEN END ELSE END and also SEL.VERB = 'SELECT FILE WITH J=1 AND K=2 AND L=3 BY ABC BY DEF BREAK-ON XYZ TO SEL.VERB = '' SEL.VERB := SELECT FILE SEL.VERB := WITH J=1 AND SEL.VERB := K=2 AND SEL.VERB :=

Re: [U2] Case Statement with only two cases... or for that matter... one case

2012-04-19 Thread Wjhonson
-Original Message- From: dennis bartlett dqbartl...@gmail.com To: U2 Users List u2-users@listserver.u2ug.org Sent: Thu, Apr 19, 2012 4:45 pm Subject: Re: [U2] Case Statement with only two cases... or for that matter... one case Well, I wrote a proggie to process source code and break long

Re: [U2] Case Statement with only two cases... or for that matter... one case

2012-04-19 Thread Wjhonson
You replace one line with four lines I'm an atheist regarding the belief in code bloat -Original Message- From: Bill Brutzman bi...@hkmetalcraft.com To: U2 Users List u2-users@listserver.u2ug.org Sent: Thu, Apr 19, 2012 4:48 pm Subject: Re: [U2] Case Statement with only two cases