Small introspective program

Henry Spencer henry at zoo.toronto.edu
Thu Mar 14 02:46:27 AEST 1991


In article <1991Mar13.001423.5194 at Think.COM> dm at think.com (Dave Mankins) writes:
>You start the program (e.g., ``foo.c'') with:
>
>#ifdef notdef
>  cc $0 -g -o `basename $0 .c` -Ineeded-includes -lneeded-libraries 
>  exit;
>#endif notdef

It is no longer legal to put arbitrary trash after "#endif", so that
identifier has to go.  "#endif /* notdef */" is better.

Note also that you need to be careful about what you put inside #ifdef,
because it is *not* completely ignored.  The above example should be okay,
but in general the contents have to be either legal C tokens or things
that could not be mistaken for C tokens.  Notably, an unmatched ' or " is
not kosher.
-- 
"But this *is* the simplified version   | Henry Spencer @ U of Toronto Zoology
for the general public."     -S. Harris |  henry at zoo.toronto.edu  utzoo!henry



More information about the Alt.sources mailing list