|
-
May 30th, 2000, 05:13 AM
#1
Thread Starter
Lively Member
for the "while" loop, what's the difference between "wend" and "loop", what's the function of them????
I am so confused.
Cerebrate
-
May 30th, 2000, 05:17 AM
#2
The Do...Loop is provides a more structured and flexible way of looping, for example, the Do Loop you can use While or Until and you can use the Exit Do function to exit the Loop.
-
May 30th, 2000, 05:33 AM
#3
The While ... Wend loop was maintained for backwards-compatibility with older versions of Basic. QBasic introduced Do While ... Loop as a replacement, and was carried over to VB. As Megatron said, "Do" is more flexible in that you can also use "Until" with it and you can use "Exit Do" to get out of it. Essentially though, the following two examples are equivalent:
Do While x <= 10
Debug.Print x
x = x + 1
Loop
While x <= 10
Debug.Print x
x = x + 1
Wend
-
May 30th, 2000, 05:13 PM
#4
transcendental analytic
Some more goodies about Do loop
[code]
1.
Do while condition1
Loop
'Is the same as
Do until not condition1
Loop
2.
Do
Loop while condition2
'Is the same as
Do
Loop until not condition2
[code]
And for 1. you will skip the loop whenever the condition is true
And for 2. you will exit the loop after the code been executed in it, if the condition is true
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
|