Re: [U2] EXIT ; EXIT inside a loop

2012-04-23 Thread Keith Johnson [DATACOM]
I think the UNTIL should be in behind NEXT A2, rather than on the FOR line. Hoping to lighten the day... BAIL = 0 FOR A1 = 1 TO XYZZY FOR A2 = 1 TO Y IF G # H THEN BAIL = 51 ;* error code UNTIL BAIL DO NEXT A2 UNTIL BAIL DO NEXT

Re: [U2] EXIT ; EXIT inside a loop

2012-04-22 Thread Charles Stevenson
Once more, VLIST answers the question: 1: FOR A1 = 1 TO X 1 0 : 0F8 move 0 => A1 1 6 : 098 forincrA1 X 1 00058: 2: FOR A2 = 1 TO Y 2 00014 : 0F8 move 0 => A2 2 0001A : 098 forincrA2 Y 1 00050: 3:

Re: [U2] EXIT ; EXIT inside a loop

2012-04-20 Thread Dave Laansma
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 f

Re: [U2] EXIT ; EXIT inside a loop

2012-04-20 Thread Rex Gozar
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 BASI

Re: [U2] EXIT ; EXIT inside a loop

2012-04-20 Thread Dave Laansma
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-dim

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

Re: [U2] EXIT ; EXIT inside a loop

2012-04-20 Thread Dave Laansma
alf 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 A

Re: [U2] EXIT ; EXIT inside a loop

2012-04-19 Thread George Gallen
users-boun...@listserver.u2ug.org [u2-users-boun...@listserver.u2ug.org] On Behalf Of David A. Green [dgr...@dagconsulting.com] Sent: Thursday, April 19, 2012 7:41 PM To: 'U2 Users List' Subject: Re: [U2] EXIT ; EXIT inside a loop Will, Two things. First, good programming practice tells you to de

Re: [U2] EXIT ; EXIT inside a loop

2012-04-19 Thread George Gallen
p.com From: u2-users-boun...@listserver.u2ug.org [u2-users-boun...@listserver.u2ug.org] On Behalf Of Wjhonson [wjhon...@aol.com] Sent: Thursday, April 19, 2012 7:32 PM To: u2-users@listserver.u2ug.org Subject: Re: [U2] EXIT ; EXIT inside a loop You don

Re: [U2] EXIT ; EXIT inside a loop

2012-04-19 Thread David A. Green
(480) 813-1725 DAG Consulting -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 4:33 PM To: u2-users@listserver.u2ug.org Subject: Re: [U2] EXIT ; EXIT inside a loop You don

Re: [U2] EXIT ; EXIT inside a loop

2012-04-19 Thread Wjhonson
7;U2 Users List' Sent: Thu, Apr 19, 2012 4:28 pm Subject: Re: [U2] EXIT ; EXIT inside a loop I was referring to the outer loops. David A. Green 480) 813-1725 AG Consulting Original Message- rom: u2-users-boun...@listserver.u2ug.org mailto:u2-users-boun...@listserver.u2ug.org] On Be

Re: [U2] EXIT ; EXIT inside a loop

2012-04-19 Thread David A. Green
Subject: Re: [U2] EXIT ; EXIT inside a loop I have no idea what you mean, they both "abort" if you want to call it that. They both exit the loop on the exact same condition, at the exact same moment. I don't see the distinction you're trying to draw -Original Messag

Re: [U2] EXIT ; EXIT inside a loop

2012-04-19 Thread Wjhonson
U2 Users List' Sent: Thu, Apr 19, 2012 3:35 pm Subject: Re: [U2] EXIT ; EXIT inside a loop Will, This type of logic is a common practice when you can have an Abort situation n the middle of processing data. You are correct in your examples they are the same. But that is not the oint here. Yo

Re: [U2] EXIT ; EXIT inside a loop

2012-04-19 Thread David A. Green
: [U2] EXIT ; EXIT inside a loop Loop until done.flag do repeat is the same as Loop until (a=b) do repeat You don't need a done.flag in this case -Original Message- From: David A. Green To: 'U2 Users List' Sent: Thu, Apr 19, 2012 3:21 pm Subject:

Re: [U2] EXIT ; EXIT inside a loop

2012-04-19 Thread Wjhonson
Loop until done.flag do repeat is the same as Loop until (a=b) do repeat You don't need a done.flag in this case -Original Message- From: David A. Green To: 'U2 Users List' Sent: Thu, Apr 19, 2012 3:21 pm Subject: Re: [U2] EXIT ; EXIT insid

Re: [U2] EXIT ; EXIT inside a loop

2012-04-19 Thread David A. Green
: Thursday, April 19, 2012 3:18 PM To: u2-users@listserver.u2ug.org Subject: Re: [U2] EXIT ; EXIT inside a loop You don't need a DONE.FLAG at all just loop until the criteria is hit ___ U2-Users mailing list U2-Users@listserver.u2ug.org

Re: [U2] EXIT ; EXIT inside a loop

2012-04-19 Thread Wjhonson
You don't need a DONE.FLAG at all just loop until the criteria is hit -Original Message- From: David A. Green To: 'U2 Users List' Sent: Thu, Apr 19, 2012 3:15 pm Subject: Re: [U2] EXIT ; EXIT inside a loop yes adding the case statement solves the issue of hittin

Re: [U2] EXIT ; EXIT inside a loop

2012-04-19 Thread David A. Green
Users List Subject: Re: [U2] EXIT ; EXIT inside a loop FOR A1 = 1 TO X until G = H FOR A2 = 1 TO Y until G = H case G # H End case NEXT A2 case G # H End case NEXT A1 does that not work for the OPs mise en scène? (see what else I did there using case instead of if? More of a

Re: [U2] EXIT ; EXIT inside a loop

2012-04-19 Thread Wjhonson
Huh? you have end cases without begin cases? I don't know what this means -Original Message- From: Boydell, Stuart To: U2 Users List Sent: Thu, Apr 19, 2012 3:05 pm Subject: Re: [U2] EXIT ; EXIT inside a loop FOR A1 = 1 TO X until G = H FOR A2 = 1 TO Y until G = H c

Re: [U2] EXIT ; EXIT inside a loop

2012-04-19 Thread Boydell, Stuart
). From: David A. Green Sent: 20-Apr-12 7:36 To: 'U2 Users List' Subject: Re: [U2] EXIT ; EXIT inside a loop I think people are missing the original post. A WHILE or UNTIL on the FOR...NEXT doesn't work for this scenario. That is why I suggested t

Re: [U2] EXIT ; EXIT inside a loop

2012-04-19 Thread David A. Green
I think people are missing the original post. A WHILE or UNTIL on the FOR...NEXT doesn't work for this scenario. That is why I suggested the LOOP...UNTIL...DO...REPEAT construct. David A. Green (480) 813-1725 DAG Consulting ___ U2-Users mailing list

Re: [U2] EXIT ; EXIT inside a loop

2012-04-19 Thread Colin Alfke
st' Subject: Re: [U2] EXIT ; EXIT inside a loop You could add logic to the For Next as in: A1.DONE = FALSE A2.DONE = FALSE FOR A1 = 1 TO X UNTIL A1.DONE FOR A2 = 1 TO Y UNTIL A2.DONE IF G = H THEN A1.DONE = TRUE; A2.DONE = TRUE; EXIT NEXT A2 NEXT A1 The question i

Re: [U2] EXIT ; EXIT inside a loop

2012-04-19 Thread Wjhonson
T REPEAT Must be my PASCAL background. No wire hangers I mean no gotos, no exits, no return tos... modular, relocatable logic only -Original Message- From: Boydell, Stuart To: U2 Users List Sent: Thu, Apr 19, 2012 2:00 pm Subject: Re: [U2] EXIT ; EXIT inside a loop It would work,

Re: [U2] EXIT ; EXIT inside a loop

2012-04-19 Thread Rex Gozar
BTW are you really just trying to do a FINDSTR? ___ 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-19 Thread Rex Gozar
Laansma > Sent: 20-Apr-12 6:36 > 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 >

Re: [U2] EXIT ; EXIT inside a loop

2012-04-19 Thread Boydell, Stuart
xt A2 Stuart From: Dave Laansma Sent: 20-Apr-12 6:36 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,

Re: [U2] EXIT ; EXIT inside a loop

2012-04-19 Thread Dave Laansma
t: Re: [U2] EXIT ; EXIT inside a loop You could add logic to the For Next as in: A1.DONE = FALSE A2.DONE = FALSE FOR A1 = 1 TO X UNTIL A1.DONE FOR A2 = 1 TO Y UNTIL A2.DONE IF G = H THEN A1.DONE = TRUE; A2.DONE = TRUE; EXIT NEXT A2 NEXT A1 The question is, if G

Re: [U2] EXIT ; EXIT inside a loop

2012-04-19 Thread Lunt, Bruce
You could add logic to the For Next as in: A1.DONE = FALSE A2.DONE = FALSE FOR A1 = 1 TO X UNTIL A1.DONE FOR A2 = 1 TO Y UNTIL A2.DONE IF G = H THEN A1.DONE = TRUE; A2.DONE = TRUE; EXIT NEXT A2 NEXT A1 The question is, if G = H, will the two EXIT commands drop o

Re: [U2] EXIT ; EXIT inside a loop

2012-04-19 Thread Rex Gozar
or use the UNTIL or WHILE clauses on the FOR-NEXT On Thu, Apr 19, 2012 at 4:46 PM, David A. Green wrote: > Without testing I would say no.  The EXIT is a branching statement, a GOTO > in disguise. > > Using a LOOP WHILE REPEAT construct might be better. > > David A. Green

Re: [U2] EXIT ; EXIT inside a loop

2012-04-19 Thread David A. Green
...@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

Re: [U2] EXIT ; EXIT inside a loop

2012-04-19 Thread Woodward, Bob
...@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

[U2] EXIT ; EXIT inside a loop

2012-04-19 Thread Dave Laansma
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