Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Let us all take a moment

Name: Anonymous 2014-04-15 21:47

to appreciate the underused an undervalued do-while. If I ever had a reason to use a while loop that executed before evaluating the predicate, the do-while loop is the loop I would choose.

Name: Anonymous 2014-04-15 23:11

A simple

int cond = 1;
while (cond) {
if (nigger) {
cond = 0;
}
jews();
}


This code is guaranteed to run at least once, and the nigger condition can be changed whenever you want, be it the first or the 10000th iteration of the loop.

Does do-while have any advantage over a plain old while?

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List