break a for loop

2004-04-08 Thread StudentTommy
Hi, I would like to prematurely break my for loop? I had read something about a keyword break! How can I use it?? ThX

Re: break a for loop

2004-04-08 Thread [EMAIL PROTECTED]
Hi Tommy, forget it - not possible - use a while loop regards Werner

Re: break a for loop

2004-04-08 Thread shoneill
Nide idea Ed, Never thought of that Just leaves the problem of output values (if this is required), but should be easy enough to do. Shane.

Re: break a for loop

2004-04-08 Thread Ed Dickens
Output values can be handled. If you're building an array on the For loop, also grab the iteration count into a shift register when you stop the loop, then you'll know where in the array it stopped. Otherwise you fill an array with NAN, empty string or some other known value so you can tell

Re: break a for loop

2004-04-08 Thread Ed Dickens
It is actually somewhat possible. But not recommended. If you need to break out of a loop, use a While Loop. If you're dead set on using a For loop, put a Case structure in the For loop and put all your code in the False case and leave the True case empty. Put a shift register on the For loop