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 little twisted logic IF G # H THEN BAIL = 51 ;* error code UNTIL BAIL DO twisted little logic

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

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

Re: [U2] EXIT ; EXIT inside a loop

2012-04-20 Thread Dave Laansma
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 dlaan...@hubbardsupply.com wrote: This example was brought up because I'm essentially 'searching' through a 3-dimensional table and when

Re: [U2] EXIT ; EXIT inside a loop

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

Re: [U2] EXIT ; EXIT inside a loop

2012-04-20 Thread Dave Laansma
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 dlaan...@hubbardsupply.com wrote: I won't know it's the right string until I perform

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 little twisted logic IF G = H THEN EXIT ; EXIT twisted little logic NEXT A2 twisting

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 dgr...@dagconsulting.com 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 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 little twisted logic IF G = H THEN A1.DONE = TRUE; A2.DONE = TRUE; EXIT twisted little logic NEXT A2 twisting little logic NEXT A1

Re: [U2] EXIT ; EXIT inside a loop

2012-04-19 Thread Dave Laansma
List' 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 little twisted logic IF G = H THEN A1.DONE = TRUE; A2.DONE = TRUE; EXIT twisted little logic

Re: [U2] EXIT ; EXIT inside a loop

2012-04-19 Thread Boydell, Stuart
) next A1 next 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 little twisted logic IF G = H THEN EXIT ; EXIT twisted little logic

Re: [U2] EXIT ; EXIT inside a loop

2012-04-19 Thread Rex Gozar
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    little twisted logic    IF G = H THEN EXIT ; EXIT    twisted little logic  NEXT A2  twisting little logic NEXT A1 little twisting logic The question

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 Wjhonson
retwisted logic (agh) ext A1 ext A2 Stuart ___ rom: Dave Laansma ent: 20-Apr-12 6:36 o: u2-users@listserver.u2ug.org ubject: [U2] EXIT ; EXIT inside a loop Given: FOR A1 = 1 TO X FOR A2 = 1 TO Y little twisted logic IF G = H THEN EXIT ; EXIT twisted little

Re: [U2] EXIT ; EXIT inside a loop

2012-04-19 Thread Colin Alfke
' 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 little twisted logic IF G = H THEN A1.DONE = TRUE; A2.DONE = TRUE; EXIT twisted little logic

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 Boydell, Stuart
of if? More of a Volvo than a Ford a little bit boxy, but quite safe). 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

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 stuart.boyd...@spotless.com.au To: U2 Users List u2-users@listserver.u2ug.org Sent: Thu, Apr 19, 2012 3:05 pm Subject: Re: [U2] EXIT ; EXIT inside a loop FOR A1 = 1 TO X

Re: [U2] EXIT ; EXIT inside a loop

2012-04-19 Thread David A. Green
: Thursday, April 19, 2012 3:05 PM To: U2 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 little twisted logic case G # H twisted little logic End case NEXT A2 case G # H twisting little logic End case NEXT A1 does

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 dgr...@dagconsulting.com To: 'U2 Users List' u2-users@listserver.u2ug.org Sent: Thu, Apr 19, 2012 3:15 pm Subject: Re: [U2] EXIT ; EXIT inside a loop yes adding the case

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 http

Re: [U2] EXIT ; EXIT inside a loop

2012-04-19 Thread Wjhonson
Subject: Re: [U2] EXIT ; EXIT inside a loop Will, The DONE.FLAG allows the program to gracefully exit out without having to go hru frivolous loops. David A. Green 480) 813-1725 AG Consulting Original Message- rom: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun

Re: [U2] EXIT ; EXIT inside a loop

2012-04-19 Thread David A. Green
, Apr 19, 2012 3:21 pm Subject: Re: [U2] EXIT ; EXIT inside a loop Will, The DONE.FLAG allows the program to gracefully exit out without having to go hru frivolous loops. David A. Green 480) 813-1725 AG Consulting Original Message- rom: u2-users-boun...@listserver.u2ug.org [mailto:u2-users

Re: [U2] EXIT ; EXIT inside a loop

2012-04-19 Thread Wjhonson
Users List' u2-users@listserver.u2ug.org 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

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 Message- From: David

Re: [U2] EXIT ; EXIT inside a loop

2012-04-19 Thread Wjhonson
...@dagconsulting.com To: 'U2 Users List' u2-users@listserver.u2ug.org 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

Re: [U2] EXIT ; EXIT inside a loop

2012-04-19 Thread David A. Green
) 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't need

Re: [U2] EXIT ; EXIT inside a loop

2012-04-19 Thread George Gallen
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't need

Re: [U2] EXIT ; EXIT inside a loop

2012-04-19 Thread George Gallen
...@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 define the abort logic