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
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
;* 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
.
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
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
@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
[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
...@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
;)
-Original Message-
From: u2-users-boun...@listserver.u2ug.org
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Dave Laansma
Sent: 19 April 2012 20:57
To: U2 Users List
Subject: Re: [U2] Case Statement with only two cases
Logically they are clearly the same. It just depends on what
April 2012 09:45
To: 'U2 Users List'
Subject: Re: [U2] Case Statement with only two cases
Or perhaps there were more cases in there, and over the years they have been
deleted. The last programmer to have done a deletion probably should have
turned it into an if - but I don't think it really matters
To: 'U2 Users List'
Subject: Re: [U2] Case Statement with only two cases
Or perhaps there were more cases in there, and over the years they have been
deleted. The last programmer to have done a deletion probably should have
turned it into an if - but I don't think it really matters, any
A respectful correction, Brian.
On 4/20/2012 4:50 AM, Brian Leach wrote:
it's all the same to the compiler.
-Original Message-
BEGIN CASE
CASE A = TEST; GOSUB DO.SOMETHING
CASE 1; GOSUB DO.SOMETHING.ELSE
END CASE
versus this
IF A = TEST THEN GOSUB DO.SOMETHING
optimize. cds
Amen!
-Original Message-
From: u2-users-boun...@listserver.u2ug.org
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Charles Stevenson
Sent: Friday, April 20, 2012 7:28 AM
To: U2 Users List
Subject: Re: [U2] Case Statement with only two cases
A respectful
degree turn: everything is back in
one rack: cpu's, storage, networking...
Date: Fri, 20 Apr 2012 08:27:48 -0500
From: stevenson.c...@gmail.com
To: u2-users@listserver.u2ug.org
Subject: Re: [U2] Case Statement with only two cases
A respectful correction, Brian.
On 4/20/2012 4:50 AM, Brian
14:28
To: U2 Users List
Subject: Re: [U2] Case Statement with only two cases
A respectful correction, Brian.
On 4/20/2012 4:50 AM, Brian Leach wrote:
it's all the same to the compiler.
-Original Message-
BEGIN CASE
CASE A = TEST; GOSUB DO.SOMETHING
CASE 1; GOSUB
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
.
-Original Message-
From: Charles Stevenson stevenson.c...@gmail.com
To: U2 Users List u2-users@listserver.u2ug.org
Sent: Fri, Apr 20, 2012 6:28 am
Subject: Re: [U2] Case Statement with only two cases
A respectful correction, Brian.
On 4/20/2012 4:50 AM, Brian Leach wrote:
it's all the same
Case 1 DOES mean otherwise... in a bloat-free way... such as...
Begin case
Case x 10 ; gosub subY
Case 1; gosub subZ
Endcase
--Bill
-Original Message-
From: u2-users-boun...@listserver.u2ug.org
[mailto:u2-users-boun...@listserver.u2ug.org] On
To: U2 Users List u2-users@listserver.u2ug.org
Sent: Fri, Apr 20, 2012 10:43 am
Subject: Re: [U2] Case 1
Case 1 DOES mean otherwise... in a bloat-free way... such as...
Begin case
Case x 10 ; gosub subY
Case 1; gosub subZ
ndcase
--Bill
-Original Message
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
Sometimes I build a case statement like this because I figure I'll grow
into it by the time I'm done doing what I'm trying to do. :-)
Bill
- Original Message -
*From:* wjhon...@aol.com
*To:*
Logically they are clearly the same. It just depends on what the
programmer had in mind for the future of 'A'.
Sincerely,
David Laansma
IT Manager
Hubbard Supply Co.
Direct: 810-342-7143
Office: 810-234-8681
Fax: 810-234-6142
www.hubbardsupply.com
Delivering Products, Services and Innovative
: [U2] Case Statement with only two cases
Makes FUTURE maintenance MUCH easier if you want to add 1 or 2 or 5 more
cases
On Thu, Apr 19, 2012 at 2:52 PM, Wjhonson wjhon...@aol.com wrote:
Is there a point in code like this
BEGIN CASE
CASE A = TEST; GOSUB DO.SOMETHING
CASE 1; GOSUB
The case statement can be faster if you put the condition with the most
occurrences first. As soon as the 'true' condition is met, the program exits
the case statement. The if-then-else construct took longer to evaluate. When
processors were slow, there were gains to be had.
Richard
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
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
-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
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
-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
...@listserver.u2ug.org] On Behalf Of Wjhonson
Sent: Thursday, April 19, 2012 5:33 PM
To: u2-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
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
Message-
Sent: Thursday, April 19, 2012 5:44 PM
Subject: Re: [U2] Case Statement
That's like saying that Mercury's are being replaced by Ford's.same
difference
___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman
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 :=
-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
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
-Original Message-
From: u2-users-boun...@listserver.u2ug.org
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Wjhonson
Sent: Thursday, April 19, 2012 7:50 PM
Subject: Re: [U2] Case Statement
Replacing one line with four lines...
___
U2
-Original Message-
Sent: Thursday, April 19, 2012 5:44 PM
Subject: Re: [U2] Case Statement
That's like saying that Mercury's are being replaced by Ford's.same
difference
___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http
Unidata BASIC has the -I option to allow reserved words to be case insensitive
- print would work, although this wasn't available in the older versions.
-Original Message-
From: u2-users-boun...@listserver.u2ug.org
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Ed Clark
I see that -I option in the 6.1 developing unibasic applications manual so it
isn't brand new. In fact it's listed in the options list twice :) But
identifiers are still case sensitive (and aren't in D3).
On Apr 8, 2011, at 2:40 PM, Dave Davis wrote:
Unidata BASIC has the -I option to allow
:* u...@edclark.net
*To:* U2 Users List u2-users@listserver.u2ug.org
*Date:* 4/8/2011 1:32 PM
*Subject:* Re: [U2] Case Sensitivity and Databasic conversion
I see that -I option in the 6.1 developing unibasic applications manual so it
isn't brand new. In fact it's listed in the options list twice
.
Bill
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of BobJ
Sent: Sunday, November 21, 2004 12:05 PM
To: [EMAIL PROTECTED]
Subject: Re: [U2] Case
Thanks. Once I had the clue I was able to find the right words
in the docs.
BobJ
- Original
To: [EMAIL PROTECTED]
Subject: RE: [U2] Case
Bob:
Raining Data has their PDP.NET product available for the U2 products.
I'm
presently using it for D3 but can't judge its efficacy for U2...would
assume
it works just fine though.
You might try checking this out:
http://www.rainingdata.com/products
On Sun, 21 Nov 2004 11:49:38 -0500, you wrote:
Universe 10.1 PE
The case appears to be reversed Is there some way to stand this thing on
its head and get normal casing back? It's only a mild irritant but it IS an
irritant and the product seems to complete for something like that to have
Thank you. One more minor irritant bights the dust!
BobJ
- Original Message -
From: Allen Egerton [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Sunday, November 21, 2004 12:38 PM
Subject: Re: [U2] Case
On Sun, 21 Nov 2004 11:49:38 -0500, you wrote:
Universe 10.1 PE
The case appears
You're correct that there's an option,
put PTERM CASE NOINVERT in the LOGIN para in the VOC
The feature was implemented with the best intentions, for developers moving
between the determinedly lower-case Unix Operating System and the equally
determinedly upper-case DBMS. Some people love it,
INVERT will make the case in UV opposite to the Shift-Lock key. PTERM
CASE NOINVERT makes it the same as the Shift-Lock key.
--
Regards,
Clif
~~~
W. Clifton Oliver, CCP
CLIFTON OLIVER ASSOCIATES
Tel: +1 619 460 5678Web: www.oliver.com
Thanks. Once I had the clue I was able to find the right words in the docs.
BobJ
- Original Message -
From: Clifton Oliver [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Sunday, November 21, 2004 2:01 PM
Subject: Re: [U2] Case
INVERT will make the case in UV opposite to the Shift-Lock
47 matches
Mail list logo