line comments (## vs. //)

Tim Maroney tim at cmu-cs-k.ARPA
Fri Nov 30 11:16:35 AEST 1984


The objection to:

#define // /*

is not that cpp will gobble the /*.  In fact, most preprocessors allow you
to do the following cute trick:

#define wombat(x) wombats/**/x

so that wombat(fred) expands to wombatsfred.

No; the objections are that "//" is not an identifier, and only identifiers
may be #define'd; and that it doesn't work (as has been pointed out) to give
a line commenting feature.
-- 
Tim Maroney, Carnegie-Mellon University Computation Center
ARPA:	Tim.Maroney at CMU-CS-K
uucp:	seismo!cmu-cs-k!tim (supposedly)

"Remember all ye that existence is pure joy; that all the sorrows are
but as shadows; they pass & are done; but there is that which remains."
Liber AL, II:9.



More information about the Comp.lang.c mailing list