#define forever for(;;)

Andrew Walduck andrew at motto.UUCP
Tue Oct 23 01:21:39 AEST 1990


>how about these:
>
>#define ever (;;)
>#define nothing ;
>
>Then you get
>
>for ever
>	{
>	...
>	}
Is this really defined to loop forever?? Does ANSI guarantee this
behaviour? 
Just to be safe I'd define ever like:
#define ever(;1;)
Just to make the behaviour predictable.

>-----------------
>Jeffrey Hutzelman
>America Online: JeffreyH11
>Internet/BITNET:jh4o+ at andrew.cmu.edu, jhutz at drycas.club.cc.cmu.edu,
>                jh4o at cmuccvma

>>> Apple // Forever!!! <<
<< Commodore 64 forever!!! >> ;-)

Andrew Walduck
andrew at motto.UUCP -- Motorola Canada



More information about the Comp.lang.c mailing list