Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / How to break from a for loop?

Author
Message
Mistrel
Retired Moderator
19
Years of Service
User Offline
Joined: 9th Nov 2005
Location:
Posted: 28th Oct 2006 19:31
Is there a command for breaking out of a for loop?



BREAK doesn't work.

I could do this:



But this would only hold true if the value of total is static.

http://3dfolio.com
Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 28th Oct 2006 20:00
so make it this way:



"Using Unix is the computing equivalent of listening only to music by David Cassidy" - Rob Pike
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 28th Oct 2006 21:33 Edited at: 28th Oct 2006 21:35
or use EXIT

although if you ever look at Lee Bamber's code, he doesn't use EXIT



Gil Galvanti
19
Years of Service
User Offline
Joined: 22nd Dec 2004
Location: Texas, United States
Posted: 28th Oct 2006 21:59
@Phaelax: Hmm...that's smart, never though of that before, I've always just stopped checking for using a trigger whatever I was checking for after it found it in a for...next loop then let it finish, but that would be faster .

Pirates of Port Royale
Live the life of a pirate.
Mistrel
Retired Moderator
19
Years of Service
User Offline
Joined: 9th Nov 2005
Location:
Posted: 28th Oct 2006 23:20
That's it. Thank you.

http://3dfolio.com

Login to post a reply

Server time is: 2024-11-27 03:47:40
Your offset time is: 2024-11-27 03:47:40