
Thanks!
No, thats a head controlled loop and no foot controlled like "Repeat : Until". He just wants to have a "do : while" loop like "Repeat : Until" but without inverting the Until block. But he could also just use Macros and build it himself:netmaestro wrote:The While..Wend block does exactly what you ask, it just doesn't use the Repeat keyword before While. It's already implemented.
Code: Select all
Macro WhileEx(condition)
Until Not (condition)
EndMacro
Define i.i
i = 0
Repeat
i + 1
WhileEx(i < 10)
Debug i
Code: Select all
While Not ( ... load of crap ... )
...
Wend
This is a head controlled loop. Learn the basics of programming please!!blueznl wrote:Can't you do something like...
I guess I'm not properly understanding the questionCode: Select all
While Not ( ... load of crap ... ) ... Wend
Code: Select all
Repeat
...
Until Not ( ... load of crap ...)
Yes, exactly thats what he wants. But its not useful and more complicating the syntax. Other languages also only have one statement for foot controlled loops.blueznl wrote:So...
?Code: Select all
Repeat ... Until Not ( ... load of crap ...)
Why should Fred waste his time implementing a whole new loop just because you won't use the Not operator?Tenaja wrote:Thankfully, the ignorant have already been addressed. (Thanks.) For the opinionated... yes, we already have all the loops we "need," but if Fred quit at all we "need," then there would only be If/Goto statements!
While I agree, in principle, there are two problems... either the loop isn't guaranteed to run a minimum of once (as in repeat...until or do...while) OR the compilers parsing of it is a huge pain because you'd have to buffer the conditional test and paste it at the end of the loop code. And since most compilers don't buffer code, that would be a huge rework of the system.blueznl wrote: By the way, I strongly believe loops with the conditional parameter WHEN ENTERING are often a better way to program, as they keep code more readable. Again, it's a matter of choice, but isn't that the case with anything? (Including girlfriends)
Matter of choice is not an option, both forms are needed to solve certain problems. For example a bubble sort algorithm can be more elegantly solved using a do...while loop.blueznl wrote:By the way, I strongly believe loops with the conditional parameter WHEN ENTERING are often a better way to program, as they keep code more readable. Again, it's a matter of choice, but isn't that the case with anything? (Including girlfriends)