Comment removal

Tom Middleton middleto at sdsu.UUCP
Mon Feb 6 05:39:11 AEST 1989


In article <> scm at datlog.co.uk ( Steve Mawer ) writes:
>If you've ever looked at the output from
>the C compiler's preprocessor (on every
>system *I've* seen, anyway) you'll find
>that all comment lines are replaced with
>blank lines.

i=1/* this is a comment */1 ;
j=1/* this is
a comment */1 ;

I tried the above on our SUN, our ELXSI and our CELERITY.  The results
were the same for all three.  The second line resulted in an error which
would indicate the comment was replaced by white space of some sort.
However, the first line worked just fine and the value of i when printed
was 11.  This would seem to indicate the comment was simply removed and
not replaced with whitespace (i=1 1; is an error).

Don't know if this is significant at all and I don't recommend comments
inside of constants but thought it was interesting enough to mention.
replaces it with nothing.

-- 
 G O    P A D R E S !		Thomas Earl Middleton
    1989			aka Happy Bare
 N L    C H A M P S !		UUCP  ...!ucsd!sdsu!middleto
 W S    C H A M P S !		ARPA  middleto%sdsu.uucp at ucsd.edu



More information about the Comp.lang.c mailing list