quotes inside #if 0
Doug Gwyn
gwyn at smoke.BRL.MIL
Wed Sep 6 00:18:54 AEST 1989
In article <2014 at munnari.oz.au> ok at cs.mu.oz.au (Richard O'Keefe) writes:
> #if 0
> <oodles of English text and C examples>
> #endif
>The compiler sees words like "don't" in the English text and snarls that
>these are unterminated character constants. This used to be perfectly
>good C, and whatever the reason for ANSI C breaking well-commented programs,
>I personally think the cost is way too high. Spilled milk, alas.
There were C compilers that would have the same problem with such "code"
before ANSI C. Generally, it's a problem for tokenizing preprocessors.
>Is there a way of having mixed English text and C fragments (possibly
>including C comment delimiters) in a C program which _will_ work in ANSI C?
/*
English stuff
sample_code(); // sample comment
more English stuff
*/
C is not WEB.
More information about the Comp.lang.c
mailing list