Xref: utzoo comp.std.c:3739 comp.lang.c:32771 Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!yale!mintaka!spdcc!ima!haddock!karl From: karl@haddock.ima.isc.com (Karl Heuer) Newsgroups: comp.std.c,comp.lang.c Subject: Re: Q-> can you nest comments in var names? Keywords: C, c, identifiers, nested, comments, Kernighan, Ritchie Message-ID: <18482@haddock.ima.isc.com> Date: 11 Oct 90 01:05:34 GMT References: <1990Oct10.211829.3168@eng.umd.edu> Reply-To: karl@ima.isc.com (Karl Heuer) Organization: Interactive Systems, Cambridge, MA 02138-5302 Lines: 10 Supersedes: <18481@haddock.ima.isc.com> In article <1990Oct10.211829.3168@eng.umd.edu> rfink@eng.umd.edu (Russell A. Fink) writes: >By rules of Kernighan and Ritchie, or standard adaptations of the >language, can I nest comments within variable names? > printf ("Value is %d", num/* this is obnoxious */ber); It's illegal (because comments are whitespace) in ANSI C. In Classic C it's illegal according to the book, but legal by common practice, so the practical answer is that it's implementation-dependent. Karl W. Z. Heuer (karl@ima.isc.com or harvard!ima!karl), The Walking Lint