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

while vs for

Name: Anonymous 2010-07-02 13:41

Whats the difference?

Name: Anonymous 2010-07-02 13:44

for(;;) is faster than while(1) because it doesn't have to check a condition on every pass. Other than that, they're basically equivalent.

Name: Anonymous 2010-07-02 13:52

You can write small loops inside the for(;;), and they generally work faster. while/break is better for abstracting state.
for(;;) does not check for condition  while(?) needs a condition to work.

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