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:

    Perhaps basketball and poetry have just a few things in common, but the most important is the possibility of transcendence. The opposite is labor. In writing, every writer knows when he or she is laboring to achieve an effect. You want to get from here to there, but find yourself willing it, forcing it. The equivalent in basketball is aiming your shot, a kind of strained and usually ineffective purposefulness. What you want is to be in some kind of flow, each next moment a discovery.
    Stephen Dunn (b. 1939)

    Psychologists have set about describing the true nature of women with a certainty and a sense of their own infallibility rarely found in the secular world.
    Naomi Weisstein, U.S. psychologist, feminist, and author. Psychology Constructs the Female (1969)