Infinite loops

gwyn at BRL.ARPA gwyn at BRL.ARPA
Sat Apr 19 10:57:51 AEST 1986


do ... while(1);

while(1) ...

for(;;) ...

are all widely-used idioms for unconditional looping in C.
I personally prefer the latter, but the choice is just a
matter of taste.  Any reasonable compiler will generate
efficient code for all three constructs.



More information about the Comp.lang.c mailing list