2 ms·
I don't think so. The first evaluation of the body is a given, the "repeat" means to do it more times while the EXPR is true.
by baddox 16y ago
I don't think so. The first evaluation of the body is a given, the "repeat" means to do it more times while the EXPR is true.
- protomyth 16y agoIt 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.