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:
“But then people dont read literature in order to understand; they read it because they want to re-live the feelings and sensations which they found exciting in the past. Art can be a lot of things; but in actual practice, most of it is merely the mental equivalent of alcohol and cantharides.”
—Aldous Huxley (18941963)
“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)
Related Phrases
Related Words