delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/10/17/05:18:11

Date: Fri, 17 Oct 1997 11:15:34 +0200 (MDT)
From: Thomas Knudsen <tk AT geb DOT gfy DOT ku DOT dk>
To: djgpp AT delorie DOT com
Subject: Re: nested commtents
Message-ID: <Pine.SGI.3.95.971017111329.13384C-100000@geb.gfy.ku.dk>
MIME-Version: 1.0

On 17 Oct 1997, Ralf Haueisen wrote:
> Hello.
> 
> A few days ago I donwloaded djgcc, but neither RHIDE nor GCC accepted
> /* comment /* comment */ comment */. The last comment was treated as
> code. I searched for any settings but did not found. Maybe someone can help
> me.
> 
> Ralf
> 
> --
> Ralf Haueisen, DF1IAZ
> ubas AT rz DOT uni-karlsruhe DOT de

Nesting comments is *not* possible in standard C. Code written using such
constructs is non-portable, and a nuisance to maintain.

Comments should be used to *comment* your code, not to implement
conditional compiling. If this is what you want, use a construct like:

#ifdef DEBUG
/* this code only used during debugging */
...
#endif

hth
Thomas

--
Thomas Knudsen                         | www:  http://www.gfy.ku.dk/~tk/
National Survey and Cadastre - Denmark | e-mail:            tk AT gfy DOT ku DOT dk
Geodetic office, Rentemestervej 8      | Direct Phone:   +45 35 87 52 64
DK-2400 Copenhagen NV, Denmark         | FAX:            +45 35 87 50 52



- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019