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:
“Nobody can deny but religion is a comfort to the distressed, a cordial to the sick, and sometimes a restraint on the wicked; therefore whoever would argue or laugh it out of the world without giving some equivalent for it ought to be treated as a common enemy.”
—Mary Wortley, Lady Montagu (16891762)
“In some extremely important ways, people are what you expect them to be, or at least they behave as you expect them to behave.”
—Naomi Weisstein, U.S. psychologist, feminist, and author. Psychology Constructs the Female (1969)