🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c
Article #2245

Re: comment style

#2245
From: Larry Hastings
Date: Mon, 07 Jan 1991 11:51
28 lines
1771 bytes
+-In article <1991Jan05.194321.12428@kithrup.COM>,
| sef@kithrup.COM (Sean Eric Fagan) wrote:
|
| I know of only one C compiler that accepts //-style comments:  Microsoft C,
| versions 5.0 and later.
+----------

Well, that's certainly not all of them; Turbo C++ (and perhaps Turbo C 2.0)
for DOS accepts // comments, as do all the MetaWare compilers since version
1.5 (which is about two years).

As for /* */ style comments, I'd just use /*/ for both ends if I could
get away with it.  This makes it possible to have a single keymacro that emits
both the begin and end comment markers.  Comments would now look like:

	printf("\n");  /*/ I'm commenting this line for no reason /*/

This works quite well with all the compilers I have handy.  The only reason I
don't do this is because I'm afraid my coworkers would form a lynch mob.
--
larry hastings, the galactic funkster, funkstr@ucscb.ucsc.edu

I don't speak for Knowledge Dynamics or UC Santa Cruz, nor do they speak for me

"People, it's Fonzie with Teret's syndrome!"--Dennis Miller on Andrew Dice Clay
p.s. I'm kidding about the /*/ comment markers, in case you can't tell -- but
     I may work them in to an obfuscated C code contest entry
Technical Details
Message-ID: <10690@darkstar.ucsc.edu>
Path: arc1-ca.pugleaf.net!utzoo!censor!geac!torsqnt!news-server.csri.toronto.edu!clyde.concordia.ca!thunder.mcrcim.mcgill.edu!snorkelwacker.mit.edu!tut.cis.ohio-state.edu!ucbvax!agate!darkstar!ucscb.UCSC.EDU!funkstr
References: <1991Jan04.164355.15674@sco.COM> <1991Jan05.194321.12428@kithrup.COM>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!censor!geac!torsqnt!news-server.csri.toronto.edu!clyde.concordia.ca!thunder.mcrcim.mcgill.edu!snorkelwacker.mit.edu!tut.cis.ohio-state.edu!ucbvax!agate!darkstar!ucscb.UCSC.EDU!funkstr
From: funkstr@ucscb.UCSC.EDU (Larry Hastings)
Newsgroups: comp.std.c
Subject: Re: comment style
Message-ID: <10690@darkstar.ucsc.edu>
Date: 7 Jan 91 11:51:11 GMT
References: <1991Jan04.164355.15674@sco.COM> <1991Jan05.194321.12428@kithrup.COM>
Sender: usenet@darkstar.ucsc.edu
Organization: Knowledge Dynamics Corporation
Lines: 28