I.T. Discussion Community!
-Collapse +Expand
ASP Classic
Search ASP Classic Group:

Advanced
-Collapse +Expand ASP Classic Store

Prestwood eMagazine

September Edition
Subscribe now! It's Free!
Enter your email:

   ► MB LobbyASP Classic Coding BoardASP Classic Coding Topic   Print This     

Exit a While Loop

Exit a While Loop in ASP Classic Coding topic (part of our ASP Classic Coding group).

Quick Search: Exit While   Exit While Loop  
ParaDelphi
-- USA

I've been looking all over, how do you exit a while loop? I tried exit and that didn't work.

----
Paul "The Coder" Santoro

 Posted 11 years ago (Thread Starter)
Comment Quote
About ParaDelphi -Collapse +Expand
Visit Profile
Approved member.
Member subscribes to this thread with a verified email.
About ParaDelphi

Paul has been developing in paradox and delphi since the mid 90s.


Post ID #12739, 5 replies
Thread Started 5/12/2008 3:20:51 PM
View Counter=11085
Location=-- USA 
Joined=12 years ago   MB Posts=23   KB Comments=2  
Moderator
Mike Prestwood
Prestwood IT
Prestwood IT office in Citrus Heights, CA
You can't. The while looping structure does not support an early exit. However both a for loop and a do while loop support exit (exit for and exit do). So, change it to a do while loop and use exit do.

--
Mike Prestwood
Prestwood IT Solutions

 Posted 11 years ago
Comment Quote
About Mike Prestwood -Collapse +Expand
Visit Profile
Approved member.
Member subscribes to this thread with a verified email.
About Mike Prestwood

Mike Prestwood is a drummer, an author, and creator of the PrestwoodBoards online community. He is the President & CEO of Prestwood IT Solutions. Prestwood IT provides Coding, Website, and Computer Tech services. Mike has authored 6 computer books and over 1,200 articles. As a drummer, he maintains play-drums.com and has authored 3 drum books. If you have a project you wish to discuss with Mike, you can send him a private message through his PrestwoodBoards home page or call him 9AM to 4PM PST at 916-726-5675 x205.

Web Presence
Facebook, Prestwood IT Facebook page -- fan page. (Visit Me)
Twitter, Follow Prestwood IT on Twitter. (Visit Me)
LinkedIn, Prestwood IT company page on LinkedIn. (Visit Me)
YouTube, Prestwood IT YouTube Channel (Visit My Channel)
Website, My drum website where I sell my drum books. (http://www.play-drums.com)

Post ID #12740 (Level 1.1)  Reply to 12739
Thread Started 5/12/2008 3:27:23 PM
Location=Prestwood IT office in Citrus Heights, CA 
Joined=19 years ago   MB Posts=1410   KB Posts=1805   KB Comments=73   BLOG, Topics=4  
Moderator
Mike Prestwood
Prestwood IT
Prestwood IT office in Citrus Heights, CA
Thanks Andy. I was accussed today in email of not contributing enough and when I do my answers are incomplete.  So, thanks for posting an example. Much appreciated.

--
Mike Prestwood
Prestwood IT Solutions

 Posted 11 years ago
Comment Quote
About Mike Prestwood -Collapse +Expand
Visit Profile
Approved member.
Member subscribes to this thread with a verified email.
About Mike Prestwood

Mike Prestwood is a drummer, an author, and creator of the PrestwoodBoards online community. He is the President & CEO of Prestwood IT Solutions. Prestwood IT provides Coding, Website, and Computer Tech services. Mike has authored 6 computer books and over 1,200 articles. As a drummer, he maintains play-drums.com and has authored 3 drum books. If you have a project you wish to discuss with Mike, you can send him a private message through his PrestwoodBoards home page or call him 9AM to 4PM PST at 916-726-5675 x205.

Web Presence
Facebook, Prestwood IT Facebook page -- fan page. (Visit Me)
Twitter, Follow Prestwood IT on Twitter. (Visit Me)
LinkedIn, Prestwood IT company page on LinkedIn. (Visit Me)
YouTube, Prestwood IT YouTube Channel (Visit My Channel)
Website, My drum website where I sell my drum books. (http://www.play-drums.com)

Post ID #12744 (Level 1.2)  Reply to 12739
Reply Posted 5/12/2008 7:22:17 PM
Location=Prestwood IT office in Citrus Heights, CA 
Joined=19 years ago   MB Posts=1410   KB Posts=1805   KB Comments=73   BLOG, Topics=4  
ASPGuy
San Francisco, CA USA

And just for good measure, here's an example:

Do while Not RS.EOF
	'Do something with each record here.
	If RS.AbsolutePosition >= 50 Then
		Exit Do
	End If
Loop

The above processes up to the first 50 records in a RecordSet. It exits at 50 if there are more than 50 records.

--

Andy

 Posted 11 years ago
Comment Quote
About ASPGuy -Collapse +Expand
Visit Profile
Approved member.
Member subscribes to this thread with a verified email.
About ASPGuy

I work for a large company in SF. I spend my days mostly doing analysis but code in asp and vb.net whenever possible.


Post ID #12743 (Level 1.3)  Reply to 12739
Reply Posted 5/12/2008 7:16:13 PM
Location=San Francisco, CA USA 
Joined=12 years ago   MB Posts=48   KB Comments=5  
ASPGuy
San Francisco, CA USA
That's hilarious. Did not mean to make you look bad.  They obviously are clueless. I've never seen anyone contribute more than you with all the writing you do. I for one appreciate it!

--

Andy

 Posted 11 years ago
Comment Quote
About ASPGuy -Collapse +Expand
Visit Profile
Approved member.
Member subscribes to this thread with a verified email.
About ASPGuy

I work for a large company in SF. I spend my days mostly doing analysis but code in asp and vb.net whenever possible.


Post ID #12745 (Level 1.4)  Reply to 12739
Reply Posted 5/12/2008 7:38:07 PM
Location=San Francisco, CA USA 
Joined=12 years ago   MB Posts=48   KB Comments=5  
Most Recent Post
ParaDelphi
-- USA
Thanks to both of you. Great help as usual. I did get it from Mike's post but the example is nice especially for others looking on.

----
Paul "The Coder" Santoro

 Posted 11 years ago (Thread Starter)
Comment Quote
About ParaDelphi -Collapse +Expand
Visit Profile
Approved member.
Member subscribes to this thread with a verified email.
About ParaDelphi

Paul has been developing in paradox and delphi since the mid 90s.


Post ID #12747 (Level 1.5)  Reply to 12739
Reply Posted 5/12/2008 9:28:02 PM
Location=-- USA 
Joined=12 years ago   MB Posts=23   KB Comments=2  

Revive Thread!

Add a comment to revive this old thread and make this archived thread more useful.

Write a Comment...
Full Editor
...
Sign in...

If you are a member, Sign In. Or, you can Create a Free account now.


Anonymous Post (text-only, no HTML):

Enter your name and security key.

Your Name:
Security key = P1173A1
Enter key:
Icon: A Post    Thread    Idea    Important!    Cool    Sad    No    Yes    Includes a Link...   
Thread #12739 Counter
11085
Since 5/12/2008

Regarding...

Linked Knowledge Base Article.

This thread is linked to the following KB article.


Mike Prestwood
1. Looping in ObjectPAL

Using loop structures in ObjectPAL (for, forEach, scan, while, and looping with timers).

Posted to KB Topic: OPAL: Language Details
11 years ago, and updated 10 years ago
(1 KB Comments)

Article
Nothing New Since Your Last Visit
15463
Hits

Corel Paradox / ObjectPAL Coding


Follow PrestwoodBoards on: 


©1995-2019 PrestwoodBoards  [Security & Privacy]
Professional IT Services: Coding | Websites | Computer Tech