Loop Problem

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a construct like this:

Do While Yadda Yadda
If More Yadda Then
If Still More Yadda Then
Loop
End If
End If
Loop

Now, obviously that inner "Loop" can't fire because it can't find a matching
"Do", but I don't want to fire off an "Exit Do" because that sends me outside
the Do..Loop, where some core numeric variables are set, and that isn't what
I have in mind <g>!

So, how do I get to the top of the Do..Loop from that inner location?
 
give the last loop a label, like Continue:
then instead of your Loop, use Go To Continue:
Do While Yadda Yadda
 
Aaaaah, yes! Was the first language we old farts ever learned BASIC, where
GoTo was a way of life? I even had a time where I played with C and C++, and,
once again GoTo was okey-dokey. But for most of the past 20+ years, I have
lived in the Visual FoxPro environment, where GoTo hath no home, so I never
thought of such a simple solution.

Thankee for bringing me into the fold <g>!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top