Infinite loops

George Robbins grr at cbmvax.cbm.UUCP
Tue Apr 22 06:05:31 AEST 1986


In article <117 at brl-smoke.ARPA> gwyn at BRL.ARPA (VLD/VMB) writes:
>
>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.

#define loop for(;;)

This is a clean way to do it, but be aware that there is no obvious stopping
point, and soon C purists will soon be declaring that your code has been tainted
by exposure to noxious influences from Algol 68 or worse...

-- 
George Robbins - now working with,	uucp: {ihnp4|seismo|caip}!cbmvax!grr
but no way officially representing	arpa: cbmvax!grr at seismo.css.GOV
Commodore, Engineering Department	fone: 215-431-9255 (only by moonlite)



More information about the Comp.lang.c mailing list