comment style
Dan Bernstein
brnstnd at kramden.acf.nyu.edu
Tue Jan 8 15:03:32 AEST 1991
In article <1991Jan05.194321.12428 at kithrup.COM> sef at kithrup.COM (Sean Eric Fagan) writes:
> Fine. Please show me an existing C compiler that handles this. Please tell
> me how you are going to handle
> // we want to see if the character is a \
> if (c == '\\')
But that's the beauty of end-of-line comments: You *automatically*
delete everything, including the newline itself. // is both the comment
mechanism and the continuation mechanism. All characters past //,
through the newline, are ignored.
Apparently Microsoft C doesn't do this right. Oh, well.
> X3J11's job was to standardize *C*, not change it.
Agreed. I don't think they should have added //, or trigraphs, or
prototypes, or noalias. But // is still better than /* */.
---Dan
More information about the Comp.std.c
mailing list