Do While Loop - Equivalent Constructs

Equivalent Constructs

do { do_work; } while (condition);

is equivalent to

do_work; while (condition) { do_work; }

that (as long as the continue statement is not used) is technically equivalent to the following (though these examples are not typical or modern style):

while (true) { do_work; if (!condition) break; }

or

LOOPSTART: do_work; if (condition) goto LOOPSTART;

Read more about this topic:  Do While Loop

Famous quotes containing the words equivalent and/or constructs:

    For some men the power to destroy life becomes the equivalent to the female power to create life.
    Myriam Miedzian, U.S. author. Boys Will Be Boys, ch. 4 (1991)

    To me the “female principle” is, or at least historically has been, basically anarchic. It values order without constraint, rule by custom not by force. It has been the male who enforces order, who constructs power structures, who makes, enforces, and breaks laws.
    Ursula K. Le Guin (b. 1929)