Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Another small filled circe sub (not as fast as fcirc)
#55
@bplus

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
Fake News + Phony Politicians = Real Problems

Reply


Messages In This Thread
RE: Another small filled circe sub (not as fast as fcirc) - by Pete - 08-30-2024, 08:40 PM



Users browsing this thread: 82 Guest(s)