Article View: comp.std.c
Article #1784Re: Q-> can you nest comments in var names?
From: Karl Heuer
Date: Thu, 11 Oct 1990 01:05
Date: Thu, 11 Oct 1990 01:05
10 lines
1132 bytes
1132 bytes
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
Technical Details
Message-ID:
<18482@haddock.ima.isc.com>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!yale!mintaka!spdcc!ima!haddock!karlReferences:
<1990Oct10.211829.3168@eng.umd.edu>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!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>