2 ms·
It just seems like "repeat while EXPR { ... }" would check EXPR before the loop and the other order "repeat { ... } while EXPR" would check check the EXPR after
by protomyth 16y ago
It just seems like "repeat while EXPR { ... }" would check EXPR before the loop and the other order "repeat { ... } while EXPR" would check check the EXPR after each loop. Not a big deal, but just kinda goofy (as in ordering doesn't mean evaluation ordering).
- baddox 16y agoI disagree. The truth value of the EXPR determines whether you repeat, meaning do an additional time. I agree that it may not be the immediate interpretation, but I think the vocabulary makes sense.
- astine 16y agoExcept that 'repeat' in English doesn't always mean to do something an additional time. For example, "Repeat this task three times," means to do a task three times, not four, unless specified by the context.