top | item 41933263

(no title)

wwalexander | 1 year ago

I don’t know why “repeat” isn’t very common in place of while/loop/etc; it works out nicely grammatically.

    repeat {}
    repeat while <condition> {}
    repeat {} while <condition>
    repeat <count> {}

discuss

order

af78|1 year ago

One possible reason:

> The word "REPEAT" should not be used in place of "SAY AGAIN", especially in the vicinity of naval or other firing ranges, as "REPEAT" is an artillery proword defined in ACP 125 U.S. Supp-2(A) with the wholly different meaning of "request for the same volume of fire to be fired again with or without corrections or changes" (e.g., at the same coordinates as the previous round).

https://en.wikipedia.org/wiki/Procedure_word#Say_again

More seriously, PASCAL has repeat-until loops, similar to do-while loops in C.

aartaka|1 year ago

Pretty C does aliases "repeat" for "do", so yeah, I've got you covered!