Whitespace is your friend

John Russell john13 at garfield.MUN.EDU
Sat Dec 24 04:28:29 AEST 1988


In article <785 at auspex.UUCP> guy at auspex.UUCP (Guy Harris) writes:
> >			card=NOVALUE;
> >#define NOVALUE	-1
>
>Nevertheless, White Space is Still Your Friend, since if you put the
>white space in compilers that still honor the old syntax will do the
>right thing as well.

Negative define values are also a good place to use parentheses. There
is more than one way for the compiler to choke on an unparenthesized number.

eg. #define NOVALUE (-1)
    card2 = card1-NOVALUE

Either whitespace are brackets will allow it to parse correctly in this case.

John
-- 
"If you steal all money, kids not be able to BUY TOYS!"
			-- Saturday morning cartoon character explaining
			   why theft is bad



More information about the Comp.lang.c mailing list