Wish Regular Loops (Do Loop While Until)

emexes

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

B4X:
Do    'no need for extraneous While True (or Until False ?)
Loop
B4X:
Do Until A = B
Loop
B4X:
Do
Loop While A = B
and I know you'll just love this one two:
Do Until EOF
Loop While Count < Maximum

Call it a win for logical consistency. ?

Bonus: one-up on most other languages. :cool:
 

William Lancee

Well-Known Member
Licensed User
Longtime User
I also don't like Do While True, so here's an alternative?
In Class_Globals...
Public Const TheCowsComeHome As Boolean = False

B4X:
    Do Until TheCowsComeHome
    Loop
 
Top