Wish Regular Loops (Do Loop While Until)

emexes

Expert
Licensed User
Longtime User
It'd be great if both the Do and the Loop could simultaneously have optional While or Until clauses, eg:

Code: Copy
Do    'no need for extraneous While True (or Until False ?)
Loop
Code: Copy
Do Until A = B
Loop
Code: Copy
Do
Loop While A = B
Code: Copy
Do Until EOF
Loop While Count < Maximum

Call it a win for logical consistency. ?

Bonus: one-up on most other languages. :cool:
 
I also don't like Do While True, so here's an alternative?
In Class_Globals...
Public Const TheCowsComeHome As Boolean = False

B4X: Copy
    Do Until TheCowsComeHome
    Loop
 
Back
Top