Both read exactly the same to me - the case probably takes a bit longer to
digest cos there is more text to read, but there is not much in it. - come
on guys if you have to think about any of these then perhaps you need to
change career ?
-Original Message-
From:
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 professional
programmer can figure out what it means in less than a second ;)
Many years ago, MV developers were taught not to use CASE as on the old PICK
machines they evaluated much (much) slower than the equivalent IFs -
probably a bad compiler job. So you ended up with hideous nested IF
statements that became practically unreadable.
My personal preference has always
A little different, but this reminds me of a program I saw once with
nested IFs so deep they actually indented completely off an 80x24 screen
with 3 space indents. I still shudder. The CASE construct was far more
readable.
Charlie Noah
On 04-20-2012 4:50 AM, Brian Leach wrote:
Many years
This is my point exactly. This (and presumably the CONTINUE statement)
is one example where utilizing the semicolon construct is ineffective,
except for comments. Using the FOR/NEXT method is clearly not the
preferred method.
This example was brought up because I'm essentially 'searching' through
See FIND and/or FINDSTR in the BASIC reference guide.
On Fri, Apr 20, 2012 at 8:30 AM, Dave Laansma
dlaan...@hubbardsupply.com wrote:
This example was brought up because I'm essentially 'searching' through
a 3-dimensional table and when I find a specific string in a sub-value,
I need to abort
I won't know it's the right string until I perform a few tests on it,
thus the 'twists'.
Sincerely,
David Laansma
-Original Message-
From: u2-users-boun...@listserver.u2ug.org
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Rex Gozar
Sent: Friday, April 20, 2012 8:40 AM
To:
read the documentation -- you can step thru occurences
On Fri, Apr 20, 2012 at 8:44 AM, Dave Laansma
dlaan...@hubbardsupply.com wrote:
I won't know it's the right string until I perform a few tests on it,
thus the 'twists'.
Sincerely,
David Laansma
-Original Message-
From:
Thank you Rex, but FIND and FINDSTR assume that I know some part of what
I'm looking for.
Walking the beach, each day's rock is different.
Sincerely,
David Laansma
-Original Message-
From: u2-users-boun...@listserver.u2ug.org
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of
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
I wonder if we've already wasted more electrical biological energy by
me writing this email, dispersing it around the globe, and you reading
it, than all the machine cycles wasted executing the 2 worthless tests
in all the object scattered around the universe that Rocket could
theoretically
Yeah, it's an interesting adjustment. For those of us who began coding on
things like 8-bit 64Mhz 16Mb boxes, optimizing code was absolutely essential.
Now, my desktop is a 4-core 2.8Ghz (you can get an 8 core I7 laptop for under
$700), 8Gb of RAM 64 bit machine, and it's nearly obsolete. When
Charles
I stand corrected!
Edit: it *should be* all the same to the compiler (if the compiler knew what
it was doing)..
Brian
-Original Message-
From: u2-users-boun...@listserver.u2ug.org
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Charles Stevenson
Sent: 20 April 2012
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
I wouldn't say that's an extra worthless test.
I think what it is telling us is that CASE 1 does not mean otherwise in a
traditional sense.
It really does mean IF @TRUE or IF 1=1
Which is a bit suprising that the compiler would have been written that way,
but it does make a kind of sense.
No one addressed this from the point of actual experience, so I think we can
probably assume that no one has actually scrubbed old back up media.
Just wanted to make sure I wasn't alone in thinking that wasn't a necessary
step.
___
U2-Users mailing
I've lost contact with Joe Vargas, who when I knew him was living in
Florida and was a member of the Datatel Colleague User Group.
If you know him, could you please pass my email address to him and tell
him that I'm looking for him?
Thanks.
--
allen egerton; aeger...@pobox.com
I'm attending a PCI conference next week... I'll try to remember to ask that
question.
-Original Message-
From: u2-users-boun...@listserver.u2ug.org
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Wjhonson
Sent: Friday, April 20, 2012 12:19 PM
To: u2-users@listserver.u2ug.org
Hi Allen -- I think I saw Joe as a facebook friend of Nancy Smith's.
If you would like Nancy's email address, let me know and I will look
for it. It is now likely firstname.lastn...@ellucian.com (given
Datatel's new company name). Tell Joe I still remember that he was the
first person to get me
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
You are missing my point.
It does mean otherwise to humans.
It doesn't mean otherwise to the compiled code, as we can see.
The compiler does a compare to 1 in order to determine if it should do the
action or jump over it.
-Original Message-
From: Bill Brutzman bi...@hkmetalcraft.com
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
22 matches
Mail list logo