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:

    I started off rapping for people just like myself, people who were in awe of wealth and flash. It was a conversation between me and them. But now most of those who buy my records are listening in on others’ conversation. They are the aural equivalent of voyeurs, thrilled at this crazy world that has nothing to do with their experience.
    Ice-T [Tracy Marrow], U.S. rap musician. Observer (London, Oct. 27, 1991)

    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)