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 ... <sigh>
... :'-|
...
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

    <little twisted logic>

    IF G = H THEN EXIT ; EXIT

    <twisted little logic>

  NEXT A2

  <twisting little logic>

NEXT A1

<little twisting logic>

 

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

 

PLOUGH

 

Sincerely,

David Laansma

IT Manager

Hubbard Supply Co.

Direct: 810-342-7143

Office: 810-234-8681

Fax: 810-234-6142

www.hubbardsupply.com <http://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

Reply via email to