@bplus
Oh, I just thought of another possibility...
Quit looping around!
Edited. The first example was some bull****!
The third coding style should be the fastest.
Pete
Oh, I just thought of another possibility...
Quit looping around!
Edited. The first example was some bull****!
Code: (Select All)
r = 5
y = 1
While y <= r ' Entry controlled loop with seed (y = 1). When y = 5 it wastes an iteration making y = 6. It then completes the 'Wend' statement and exits at the 'While' statement.
Print "y ="; y
y = y + 1
Wend
Rem or...
Print
y = 0
While y < r ' Entry controlled loop, no seed. When y = 5 it completes the 'Wend' statement and exits at the 'While' statement.
y = y + 1
Print "y ="; y
Wend
Rem or...
Print
y = 0
Do
y = y + 1 ' Exit controlled loop, no seed. When y = 5 it exits at the 'Loop Until' statement.
Print "y ="; y
Loop Until y = r
The third coding style should be the fastest.
Pete
Shoot first and shoot people who ask questions, later.