|
-
Nov 14th, 2000, 05:34 PM
#1
Thread Starter
New Member
Hi,
I'm a newbie (you can tell by my questions), I'm building a project with a nested loop, I keep getting a compile error saying loop with out do, but the do is there and both loops work outside of each other just not together, any idea's?.
Thanks!!
-
Nov 14th, 2000, 06:01 PM
#2
Addicted Member
It might be easier if you show us the code you are using... though it sounds like you aren't terminating one of the loops properly.
Here is an example from the Visual Basic Help file (Under 'Do'):
Code:
Dim Check, Counter
Check = True: Counter = 0 ' Initialize variables.
Do ' Outer loop.
Do While Counter < 20 ' Inner loop.
Counter = Counter + 1 ' Increment Counter.
If Counter = 10 Then ' If condition is True.
Check = False ' Set value of flag to False.
Exit Do ' Exit inner loop.
End If
Loop
Loop Until Check = False ' Exit outer loop immediately.
Hope this helps.
Michael
Application/Web Developer
Visual Basic 6.0 SP5
Active Server Pages
Oracle 9i
- I'm going to live forever, or die trying!
-
Nov 14th, 2000, 06:58 PM
#3
Hyperactive Member
Check all the structures you´re using. I can bet that the problem is an If without end if. Check all the if, for, do, select case... every structure.
Send us the code...
If things were easy, users might be programmers.
-
Nov 14th, 2000, 07:54 PM
#4
transcendental analytic
Indenting your code is usually the best solution! You'll see the missing end X immediately!
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|