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  ;* The reason

lining up the GOSUBs under each other, with comment making it clear why.
-- 
Kate Stanton
Walstan Systems Ltd
4 Kelmarna Ave, Herne Bay, Auckland 1011, New Zealand
Phone: + 64 9 360 5310  Mobile: + 64 21 400 486
Email: k...@walstan.com
___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users


Re: [U2] Case 1

2012-04-20 Thread Wjhonson

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 
To: U2 Users List 
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-
rom: u2-users-boun...@listserver.u2ug.org 
[mailto:u2-users-boun...@listserver.u2ug.org] 
n Behalf Of Wjhonson
ent: Friday, April 20, 2012 12:11 PM

 wouldn't say that's an extra worthless test.
 think what it is telling us is that CASE 1 does not mean "otherwise" in a 
raditional sense.
t really does mean "IF @TRUE" or "IF 1=1"
Which is a bit suprising that the compiler would have been written that way, 
but 
t does make a kind of sense.
___
2-Users mailing list
2-us...@listserver.u2ug.org
ttp://listserver.u2ug.org/mailman/listinfo/u2-users

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


Re: [U2] Case 1

2012-04-20 Thread Bill Brutzman
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 Behalf Of Wjhonson
Sent: Friday, April 20, 2012 12:11 PM


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.

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


Re: [U2] Looking for Joe Vargas.

2012-04-20 Thread Dawn Wolthuis
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 out on the dance floor (about 20 years ago).
Cheers!  --dawn

On Fri, Apr 20, 2012 at 11:55 AM, Allen Egerton  wrote:
> 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
> ___
> U2-Users mailing list
> U2-Users@listserver.u2ug.org
> http://listserver.u2ug.org/mailman/listinfo/u2-users



-- 
Dawn M. Wolthuis

Take and give some delight today
___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users


Re: [U2] Credit Card numbers in your database

2012-04-20 Thread Drew William Henderson
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
Subject: Re: [U2] Credit Card numbers in your database


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 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


[U2] Looking for Joe Vargas.

2012-04-20 Thread Allen Egerton
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
___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users


Re: [U2] Credit Card numbers in your database

2012-04-20 Thread Wjhonson

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 list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users


Re: [U2] Case Statement with only two cases

2012-04-20 Thread Wjhonson

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.



-Original Message-
From: Charles Stevenson 
To: U2 Users List 
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 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 ELSE GOSUB DO.SOMETHING.ELSE

Since we seem to be finding every nit in the bottom of this empty 
arrel, here's one more.
here are 2 compiler difference as shown by VLIST (UV10.2):
1: BEGIN CASE
2:CASE A = "TEST"; GOSUB DO.SOMETHING
0002 0 : 06E eq A "TEST"  => $R0
0002 8 : 2DE testfw $R0 00020:
0002 00010 : 0A4 gosub  00060:

0003:CASE 1; GOSUB DO.SOMETHING.ELSE
0003 00018 : 0C2 jump   00038:
0003 00020 : 2DE testfw 1 00038: <-- Extra 
orthless test
0003 00028 : 0A4 gosub  00062:
4: END CASE
0004 00030 : 0C2 jump   00038: <-- Extra worthless 
ump (to next line)
  
Source lineup is goofy.  This jump is really part

   of source line 3.   RAID is confusing, too.
   A 
iscussion for a different thread.)
5: IF A = "TEST" THEN GOSUB DO.SOMETHING ELSE GOSUB DO.SOMETHING.ELSE
0005 00038 : 06E eq A "TEST"  => $R0
0005 00040 : 2DE testfw $R0 00058:
0005 00048 : 0A4 gosub  00060:
0005 00050 : 0C2 jump   00060:
0005 00058 : 0A4 gosub  00062:
6: STOP
0006 00060 : 190 stop

ith the speed of today's machines it would be hard to find a place 
here that performance makes a difference.
Rocket could theoretically clean up both (or either independently) if 
he compiler was smart enough:
1. to know that a logical test outcome was predestined at compile time 
It already does that sort of thing in other situations.).  Then it 
ould  compile only 1 of the 2 paths the testfw takes.  (e.g. 0020x).  
ame for IF,  WHILE, or UNTIL constructs.
2. To recognize the final CASE before the END CASE never needs to jump 
e.g., 0030x).
I wonder if we've already wasted more electrical & biological energy by 
e writing this email, dispersing it around the globe, and you reading 
t, than all the machine cycles wasted executing the 2 worthless tests 
n all the object scattered around the universe that Rocket could 
heoretically optimize.
cds

__
2-Users mailing list
2-us...@listserver.u2ug.org
ttp://listserver.u2ug.org/mailman/listinfo/u2-users

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


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 
To: 'U2 Users List' 
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 the same to me - the case probably takes a bit longer to
igest cos there is more text to read, but there is not much in it. - come
n guys if you have to think about any of these then perhaps you need to
hange career ?


-Original Message-
rom: u2-users-boun...@listserver.u2ug.org
mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Bill Brutzman
ent: 19 April 2012 22:42
o: U2 Users List
ubject: Re: [U2] Case Statement with only two cases... or for that
atter... 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 ;  gosub ZZ
End   case
Except that now... note that readability is enhanced by [1] indenting... so
s to align text and [2] using mixed-case and camelCase typography.
--Bill

Original Message-
rom: u2-users-boun...@listserver.u2ug.org
mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Wjhonson
ent: Thursday, April 19, 2012 5:33 PM
o: u2-users@listserver.u2ug.org
ubject: Re: [U2] Case Statement with only two cases... or for that
atter... one case
Give an example of, with what you would replace the If Then Else

__
2-Users mailing list
2-us...@listserver.u2ug.org
ttp://listserver.u2ug.org/mailman/listinfo/u2-users

o virus found in this message.
hecked by AVG - www.avg.com
ersion: 10.0.1424 / Virus Database: 2411/4946 - Release Date: 04/19/12
___
2-Users mailing list
2-us...@listserver.u2ug.org
ttp://listserver.u2ug.org/mailman/listinfo/u2-users

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


Re: [U2] Case Statement with only two cases

2012-04-20 Thread Brian Leach
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 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 DO.SOMETHING.ELSE
> END CASE
> versus this
> IF A = "TEST" THEN GOSUB DO.SOMETHING ELSE GOSUB DO.SOMETHING.ELSE
-

Since we seem to be finding every nit in the bottom of this empty barrel,
here's one more.
There are 2 compiler difference as shown by VLIST (UV10.2):

1: BEGIN CASE

2:CASE A = "TEST"; GOSUB DO.SOMETHING
2 0 : 06E eq A "TEST"  => $R0
2 8 : 2DE testfw $R0 00020:
2 00010 : 0A4 gosub  00060:


3:CASE 1; GOSUB DO.SOMETHING.ELSE
3 00018 : 0C2 jump   00038:
3 00020 : 2DE testfw 1 00038: <-- Extra 
worthless test
3 00028 : 0A4 gosub  00062:

4: END CASE
4 00030 : 0C2 jump   00038: <-- Extra worthless 
jump (to next line)
 
(Source lineup is goofy.  This jump is really part
 
of source line 3.   RAID is confusing, too.
 
A discussion for a different thread.)

5: IF A = "TEST" THEN GOSUB DO.SOMETHING ELSE GOSUB DO.SOMETHING.ELSE
5 00038 : 06E eq A "TEST"  => $R0
5 00040 : 2DE testfw $R0 00058:
5 00048 : 0A4 gosub  00060:
5 00050 : 0C2 jump   00060:
5 00058 : 0A4 gosub  00062:

6: STOP
6 00060 : 190 stop


With the speed of today's machines it would be hard to find a place where
that performance makes a difference.

Rocket could theoretically clean up both (or either independently) if the
compiler was smart enough:

1. to know that a logical test outcome was predestined at compile time (It
already does that sort of thing in other situations.).  Then it could
compile only 1 of the 2 paths the testfw takes.  (e.g. 0020x).  
Same for IF,  WHILE, or UNTIL constructs.

2. To recognize the final CASE before the END CASE never needs to jump
(e.g., 0030x).

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
optimize.

cds


___
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


Re: [U2] Case Statement with only two cases

2012-04-20 Thread Dan Fitzgerald

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 I code (or 
review code), I'm not so much looking to wrest out every last system call 
(although I still do it out of habit), I'm just looking to make sure there are 
no egregious errors that will affect performance (or stability, or...), like 
executing a select instead of doing an internal one. Given a minimum of 
self-created bottlenecks, disk IO is still the limiting factor, (usually) not 
CPU cycles, especially if your OS isn't bloatware. In a few short years, we'll 
have solid state disks and a new set of problems. BTW, anyone see IBM's new 
offering, Pure System? In many ways, a 180 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 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 ELSE GOSUB DO.SOMETHING.ELSE
> -
> 
> Since we seem to be finding every nit in the bottom of this empty 
> barrel, here's one more.
> There are 2 compiler difference as shown by VLIST (UV10.2):
> 
> 1: BEGIN CASE
> 
> 2:CASE A = "TEST"; GOSUB DO.SOMETHING
> 2 0 : 06E eq A "TEST"  => $R0
> 2 8 : 2DE testfw $R0 00020:
> 2 00010 : 0A4 gosub  00060:
> 
> 
> 3:CASE 1; GOSUB DO.SOMETHING.ELSE
> 3 00018 : 0C2 jump   00038:
> 3 00020 : 2DE testfw 1 00038: <-- Extra 
> worthless test
> 3 00028 : 0A4 gosub  00062:
> 
> 4: END CASE
> 4 00030 : 0C2 jump   00038: <-- Extra worthless 
> jump (to next line)
>
> (Source lineup is goofy.  This jump is really part
>  
> of source line 3.   RAID is confusing, too.
> A 
> discussion for a different thread.)
> 
> 5: IF A = "TEST" THEN GOSUB DO.SOMETHING ELSE GOSUB DO.SOMETHING.ELSE
> 5 00038 : 06E eq A "TEST"  => $R0
> 5 00040 : 2DE testfw $R0 00058:
> 5 00048 : 0A4 gosub  00060:
> 5 00050 : 0C2 jump   00060:
> 5 00058 : 0A4 gosub  00062:
> 
> 6: STOP
> 6 00060 : 190 stop
> 
> 
> With the speed of today's machines it would be hard to find a place 
> where that performance makes a difference.
> 
> Rocket could theoretically clean up both (or either independently) if 
> the compiler was smart enough:
> 
> 1. to know that a logical test outcome was predestined at compile time 
> (It already does that sort of thing in other situations.).  Then it 
> could  compile only 1 of the 2 paths the testfw takes.  (e.g. 0020x).  
> Same for IF,  WHILE, or UNTIL constructs.
> 
> 2. To recognize the final CASE before the END CASE never needs to jump 
> (e.g., 0030x).
> 
> 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 optimize.
> 
> cds
> 
> 
> ___
> 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


Re: [U2] Case Statement with only two cases

2012-04-20 Thread Perry Taylor
"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 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 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 ELSE GOSUB DO.SOMETHING.ELSE
-

Since we seem to be finding every nit in the bottom of this empty 
barrel, here's one more.
There are 2 compiler difference as shown by VLIST (UV10.2):

1: BEGIN CASE

2:CASE A = "TEST"; GOSUB DO.SOMETHING
2 0 : 06E eq A "TEST"  => $R0
2 8 : 2DE testfw $R0 00020:
2 00010 : 0A4 gosub  00060:


3:CASE 1; GOSUB DO.SOMETHING.ELSE
3 00018 : 0C2 jump   00038:
3 00020 : 2DE testfw 1 00038: <-- Extra 
worthless test
3 00028 : 0A4 gosub  00062:

4: END CASE
4 00030 : 0C2 jump   00038: <-- Extra worthless 
jump (to next line)
   
(Source lineup is goofy.  This jump is really part
 
of source line 3.   RAID is confusing, too.
A 
discussion for a different thread.)

5: IF A = "TEST" THEN GOSUB DO.SOMETHING ELSE GOSUB DO.SOMETHING.ELSE
5 00038 : 06E eq A "TEST"  => $R0
5 00040 : 2DE testfw $R0 00058:
5 00048 : 0A4 gosub  00060:
5 00050 : 0C2 jump   00060:
5 00058 : 0A4 gosub  00062:

6: STOP
6 00060 : 190 stop


With the speed of today's machines it would be hard to find a place 
where that performance makes a difference.

Rocket could theoretically clean up both (or either independently) if 
the compiler was smart enough:

1. to know that a logical test outcome was predestined at compile time 
(It already does that sort of thing in other situations.).  Then it 
could  compile only 1 of the 2 paths the testfw takes.  (e.g. 0020x).  
Same for IF,  WHILE, or UNTIL constructs.

2. To recognize the final CASE before the END CASE never needs to jump 
(e.g., 0030x).

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 optimize.

cds


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

CONFIDENTIALITY NOTICE: This e-mail message, including any 
attachments, is for the sole use of the intended recipient(s) 
and may contain confidential and privileged information.  Any
unauthorized review, use, disclosure or distribution is 
prohibited. ZirMed, Inc. has strict policies regarding the 
content of e-mail communications, specifically Protected Health 
Information, any communications containing such material will 
be returned to the originating party with such advisement 
noted. If you are not the intended recipient, please contact 
the sender by reply e-mail and destroy all copies of the 
original message.
___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users


Re: [U2] Case Statement with only two cases

2012-04-20 Thread Charles Stevenson

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 ELSE GOSUB DO.SOMETHING.ELSE

-

Since we seem to be finding every nit in the bottom of this empty 
barrel, here's one more.

There are 2 compiler difference as shown by VLIST (UV10.2):

1: BEGIN CASE

2:CASE A = "TEST"; GOSUB DO.SOMETHING
2 0 : 06E eq A "TEST"  => $R0
2 8 : 2DE testfw $R0 00020:
2 00010 : 0A4 gosub  00060:


3:CASE 1; GOSUB DO.SOMETHING.ELSE
3 00018 : 0C2 jump   00038:
3 00020 : 2DE testfw 1 00038: <-- Extra 
worthless test

3 00028 : 0A4 gosub  00062:

4: END CASE
4 00030 : 0C2 jump   00038: <-- Extra worthless 
jump (to next line)

  
(Source lineup is goofy.  This jump is really part

   of source line 3.   RAID is confusing, too.

   A 
discussion for a different thread.)

5: IF A = "TEST" THEN GOSUB DO.SOMETHING ELSE GOSUB DO.SOMETHING.ELSE
5 00038 : 06E eq A "TEST"  => $R0
5 00040 : 2DE testfw $R0 00058:
5 00048 : 0A4 gosub  00060:
5 00050 : 0C2 jump   00060:
5 00058 : 0A4 gosub  00062:

6: STOP
6 00060 : 190 stop


With the speed of today's machines it would be hard to find a place 
where that performance makes a difference.


Rocket could theoretically clean up both (or either independently) if 
the compiler was smart enough:


1. to know that a logical test outcome was predestined at compile time 
(It already does that sort of thing in other situations.).  Then it 
could  compile only 1 of the 2 paths the testfw takes.  (e.g. 0020x).  
Same for IF,  WHILE, or UNTIL constructs.


2. To recognize the final CASE before the END CASE never needs to jump 
(e.g., 0030x).


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 optimize.


cds


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


Re: [U2] EXIT ; EXIT inside a loop

2012-04-20 Thread Dave Laansma
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 Rex Gozar
Sent: Friday, April 20, 2012 8:46 AM
To: U2 Users List
Subject: Re: [U2] EXIT ; EXIT inside a loop

read the documentation -- you can step thru occurences

On Fri, Apr 20, 2012 at 8:44 AM, Dave Laansma
 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: 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: U2 Users List
> Subject: Re: [U2] EXIT ; EXIT inside a loop
>
> See FIND and/or FINDSTR in the BASIC reference guide.
>
> On Fri, Apr 20, 2012 at 8:30 AM, Dave Laansma 
>  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 the search all together. I cannot bring 
>> myself to use
> ___
> 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
___
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


Re: [U2] EXIT ; EXIT inside a loop

2012-04-20 Thread Rex Gozar
read the documentation -- you can step thru occurences

On Fri, Apr 20, 2012 at 8:44 AM, Dave Laansma
 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: 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: U2 Users List
> Subject: Re: [U2] EXIT ; EXIT inside a loop
>
> See FIND and/or FINDSTR in the BASIC reference guide.
>
> On Fri, Apr 20, 2012 at 8:30 AM, Dave Laansma
>  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 the search all together. I cannot bring
>> myself to use
> ___
> 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
___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users


Re: [U2] EXIT ; EXIT inside a loop

2012-04-20 Thread Dave Laansma
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: U2 Users List
Subject: Re: [U2] EXIT ; EXIT inside a loop

See FIND and/or FINDSTR in the BASIC reference guide.

On Fri, Apr 20, 2012 at 8:30 AM, Dave Laansma
 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 the search all together. I cannot bring 
> myself to use
___
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


Re: [U2] EXIT ; EXIT inside a loop

2012-04-20 Thread Rex Gozar
See FIND and/or FINDSTR in the BASIC reference guide.

On Fri, Apr 20, 2012 at 8:30 AM, Dave Laansma
 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 the search all together. I cannot bring myself to use
___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users


Re: [U2] EXIT ; EXIT inside a loop

2012-04-20 Thread Dave Laansma
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
a 3-dimensional table and when I find a specific string in a sub-value,
I need to abort the search all together. I cannot bring myself to use
GOTO ... I just CAN'T. But maybe this once ... just this once ... 
... :'-|
...
WAIT! I think I've got it!
...
Yes, to search through each 'dimension' in a single loop ... REMOVE ...
and it's darn fast!

You people inspire GENIUS!

Glad I still had my coins.

Sincerely,
David Laansma


-Original Message-
From: u2-users-boun...@listserver.u2ug.org
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Woodward, Bob
Sent: Thursday, April 19, 2012 4:43 PM
To: U2 Users List
Subject: Re: [U2] EXIT ; EXIT inside a loop

Not from what I see.  Only the first EXIT seems to apply as it executes
immediately, skipping over the second EXIT.  You would have to add the
same test of G = H after the NEXT A2 statement.

-Original Message-
From: u2-users-boun...@listserver.u2ug.org
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Dave Laansma
Sent: Thursday, April 19, 2012 1:36 PM
To: u2-users@listserver.u2ug.org
Subject: [U2] EXIT ; EXIT inside a loop

Given:

 

FOR A1 = 1 TO X

  FOR A2 = 1 TO Y



IF G = H THEN EXIT ; EXIT



  NEXT A2

  

NEXT A1



 

The question is, if G = H, will the two EXIT commands drop out of both
loops, skipping BOTH  and ,
and resume execution at  ?

 

PLOUGH

 

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 Solutions"

 

___
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
___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users


Re: [U2] Case Statement with only two cases

2012-04-20 Thread Charlie Noah
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 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 been to use CASE as it's much clearer,
especially when you start getting complex logic in-between. The only thing I
generally change is the traditional use of CASE 1 as the fall through
option, by equating OTHER to @TRUE so I can use Case OTHER.

And multi-line Ifs that are easier to follow in the debugger, especially if
you want to place a break point on either branch.

And in Will's example, it's all the same to the compiler.

As an extreme example, I once picked up some third party code written on a
McD machine. Every routine was written so it could fit on a single page of
an 80x24 terminal, including (which McD allowed) having labels in the middle
of a physical line (semi-colon delimited statements). And having to debug
that.

Brian

-Original Message-
From: u2-users-boun...@listserver.u2ug.org
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Symeon Breen
Sent: 20 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, any professional
programmer can figure out what it means in less than a  second ;)



-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 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 Solutions"


-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 3:52 PM
To: u2-users@listserver.u2ug.org
Subject: [U2] Case Statement with only two cases


Is there a point in code like this

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 ELSE GOSUB DO.SOMETHING.ELSE

Personally I see no advantage in making this a  CASE

Does the rest of the *Universe* agree with me?
___
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
-
No virus found in this message.
Checked by AVG - www.avg.com
Version: 10.0.1424 / Virus Database: 2411/4946 - Release Date: 04/19/12

___
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


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


Re: [U2] Case Statement with only two cases

2012-04-20 Thread Brian Leach
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 been to use CASE as it's much clearer,
especially when you start getting complex logic in-between. The only thing I
generally change is the traditional use of CASE 1 as the fall through
option, by equating OTHER to @TRUE so I can use Case OTHER.

And multi-line Ifs that are easier to follow in the debugger, especially if
you want to place a break point on either branch.

And in Will's example, it's all the same to the compiler.

As an extreme example, I once picked up some third party code written on a
McD machine. Every routine was written so it could fit on a single page of
an 80x24 terminal, including (which McD allowed) having labels in the middle
of a physical line (semi-colon delimited statements). And having to debug
that.

Brian

-Original Message-
From: u2-users-boun...@listserver.u2ug.org
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Symeon Breen
Sent: 20 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, any professional
programmer can figure out what it means in less than a  second ;)



-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 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 Solutions"


-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 3:52 PM
To: u2-users@listserver.u2ug.org
Subject: [U2] Case Statement with only two cases


Is there a point in code like this

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 ELSE GOSUB DO.SOMETHING.ELSE

Personally I see no advantage in making this a  CASE

Does the rest of the *Universe* agree with me?
___
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
-
No virus found in this message.
Checked by AVG - www.avg.com
Version: 10.0.1424 / Virus Database: 2411/4946 - Release Date: 04/19/12

___
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


Re: [U2] Case Statement with only two cases

2012-04-20 Thread Symeon Breen
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 ;)



-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 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 Solutions"


-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 3:52 PM
To: u2-users@listserver.u2ug.org
Subject: [U2] Case Statement with only two cases


Is there a point in code like this

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 ELSE GOSUB DO.SOMETHING.ELSE

Personally I see no advantage in making this a  CASE

Does the rest of the *Universe* agree with me?
___
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
-
No virus found in this message.
Checked by AVG - www.avg.com
Version: 10.0.1424 / Virus Database: 2411/4946 - Release Date: 04/19/12

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


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

2012-04-20 Thread Symeon Breen
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: u2-users-boun...@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...

If XX then gosub YY  else  gosub ZZ

Replaced by

Begin case
   Case XX  ;  gosub YY
   Case 1 ;  gosub ZZ
End   case

Except that now... note that readability is enhanced by [1] indenting... so
as to align text and [2] using mixed-case and camelCase typography.

--Bill
 
-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 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


___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users
-
No virus found in this message.
Checked by AVG - www.avg.com
Version: 10.0.1424 / Virus Database: 2411/4946 - Release Date: 04/19/12

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