Equivalent Constructs
while (condition) { statements; }is equivalent to
if (condition) { do { statements; } while (condition); }or
while (true) { if (!condition) break; statements; }or
goto TEST; LOOPSTART: statements; TEST: if (condition) goto LOOPSTART;or
TEST: if (!condition) goto LOOPEND; statements goto TEST; LOOPEND:Also, in C and its descendants, a while loop is a for loop with no initialization or counting expressions, i.e.,
for ( ; condition; ) { statements; }}
Read more about this topic: While Loop
Famous quotes containing the words equivalent and/or constructs:
“In truth, politeness is artificial good humor, it covers the natural want of it, and ends by rendering habitual a substitute nearly equivalent to the real virtue.”
—Thomas Jefferson (17431826)
“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)
Related Phrases
Related Words