Article View: comp.std.c
Article #2286Re: comment style
From: Leif Andrew Rump
Date: Fri, 11 Jan 1991 15:53
Date: Fri, 11 Jan 1991 15:53
45 lines
2045 bytes
2045 bytes
In <10852@darkstar.ucsc.edu> funkstr@ucscb.UCSC.EDU (Larry Hastings) writes:
>+-In article <4423@alliant.Alliant.COM>,
>| tj@Alliant.COM (Tom Jaskiewicz) wrote:
>|
>| My first impression of // comments was that they are a harmless addition
>| to the language. After reading some of the discussion in this newgroup
>| I now believe that they are not harmless.
>|
>| If you do add // comments to c, what does the following code do?
>|
>| /* printf("One\n"); /* 1 */
>| printf("Two\n"); /* 2 */
>| /* printf("Three\n");
>| // printf("Four\n"); /* 4 */
>| printf("Five\n"); /* 5 */
>| // printf("Six\n"); /* 6
>| printf("Seven\n"); /* 7 */
>| /* printf("Eight\n");
>| // */ printf("Nine\n");
>| printf("Ten\n"); /* 10 */
>+----------
>Well, under Turbo C (which supports // comments in "Turbo C" and "Turbo C++"
>modes"), this prints
>Two
>Five
>Seven
>Nine
>Ten
Just a single question: Does TC warn you about comment (/*) inside
a comment (//)? If not then _I_ will never mix // and /**/ and maybe
even abandon // completely!!!
Leif Andrew
Leif Andrew Rump, AmbraSoft A/S, Stroedamvej 50, DK-2100 Copenhagen OE, Denmark
UUCP: andrew@ambra.dk, phone: +45 39 27 11 77 /
Currently at Scandinavian Airline Systems =======/
UUCP: andrew@resam.dk, phone: +45 32 32 51 54 \
SAS, RESAM Project Office, CPHML-V, P.O.BOX 150, DK-2770 Kastrup, Denmark
> > Read oe as: o <backspace> / (slash) and OE as O <backspace> / (slash) < <
Technical Details
Message-ID:
<1991Jan11.155326.3125@resam.dk>Path:
arc1-ca.pugleaf.net!utzoo!censor!geac!torsqnt!lethe!yunexus!ists!helios.physics.utoronto.ca!news-server.csri.toronto.edu!bonnie.concordia.ca!thunder.mcrcim.mcgill.edu!snorkelwacker.mit.edu!bloom-beacon!eru!hagbard!sunic!dkuug!resam!andrewReferences:
<4423@alliant.Alliant.COM> <10852@darkstar.ucsc.edu>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!censor!geac!torsqnt!lethe!yunexus!ists!helios.physics.utoronto.ca!news-server.csri.toronto.edu!bonnie.concordia.ca!thunder.mcrcim.mcgill.edu!snorkelwacker.mit.edu!bloom-beacon!eru!hagbard!sunic!dkuug!resam!andrew From: andrew@resam.dk (Leif Andrew Rump) Newsgroups: comp.std.c Subject: Re: comment style Message-ID: <1991Jan11.155326.3125@resam.dk> Date: 11 Jan 91 15:53:26 GMT References: <4423@alliant.Alliant.COM> <10852@darkstar.ucsc.edu> Organization: RESAM Project Office, SAS, CPHML-V Lines: 45