Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.c > #129206
| Path | csiph.com!eternal-september.org!feeder.eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail |
|---|---|
| From | Keith Thompson <kst-u@mib.org> |
| Newsgroups | comp.lang.c |
| Subject | Re: "C's Biggest Mistake" |
| Date | Sat, 14 Apr 2018 12:51:17 -0700 |
| Organization | None to speak of |
| Lines | 55 |
| Message-ID | <lnh8odmuru.fsf@kst-u.example.com> (permalink) |
| References | <daUwC.190724$oa6.85775@fx33.am4> <PRbxC.289512$sQ.267243@fx38.am4> <6zpxC.75432$bz1.69868@fx01.iad> <%6sxC.621528$Ml.294897@fx24.am4> <85txC.105783$q15.11321@fx34.iad> <JDtxC.371789$TP2.177337@fx01.am4> <houxC.91$Pz2.76@fx10.iad> <D5vxC.798164$B71.731475@fx15.am4> <slrnpcukjr.31ka.grahn+nntp@frailea.sa.invalid> <_MIzC.1013644$Ly1.422539@fx13.am4> <fj9pnvFafl7U1@mid.individual.net> <W4PzC.2352$yK2.2181@fx16.iad> <d4QzC.932860$e52.611450@fx25.am4> <FA2AC.17030$c03.8859@fx18.iad> <VB3AC.546967$%a5.281677@fx21.am4> <lny3hrm6un.fsf@kst-u.example.com> <Xp5AC.405579$WW2.337807@fx08.am4> <lntvsfm3rw.fsf@kst-u.example.com> <Xz5AC.772362$rz2.129824@fx19.am4> <x4qAC.15658$aX2.14166@fx23.iad> <e438f18b-46b2-42a4-a3fa-2485e0065ea9@googlegroups.com> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=us-ascii |
| Injection-Info | reader02.eternal-september.org; posting-host="743d05f7c22630af08c03e909762d877"; logging-data="23344"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+2oY3ja+kVluAm+YLOgJgb" |
| User-Agent | Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) |
| Cancel-Lock | sha1:qNDqcnKyyfdD7GgOH8ELmYY9EYk= sha1:KohR/Ao1yDcdNY5P5Lpu9hvgKIw= |
| Xref | csiph.com comp.lang.c:129206 |
Show key headers only | View raw
jameskuyper@verizon.net writes:
> On Saturday, April 14, 2018 at 12:34:50 PM UTC-4, Richard Damon wrote:
> ...
>> had to chose. My memory of K&R was that its wording, while not
>> definitive, leaned more to non-nesting, and I think that was more common
>> (the wording being basically that you start at the /* and ignore
>> everything until you stop at the next */, with no mention that the stuff
>> you are ignoring might include a nested comment.
>
> 123456789012345678901234567890123456789012345678901234567890123456789012
> K&R, 1st edition, Appendix A 2.1 "Comments" says "The characters /*
> introduce a comment, which terminates with the characters */. Comments
> do not nest."
The 1974 and 1975 C manuals both say:
The characters /* introduce a comment, which terminates with
the characters */.
which implies that they don't nest. The B manual says:
Comments are delimited as in PL/I by /* and */.
A PL/I grammar I found says:
comments = "/*" [ text ] "*/"
"text" is not defined, but presumably it can include "*/", which
again implies that comments do not nest.
The definition *could* have been changed at any time to allow
nesting, but it was never considered to be necessary.
Incidentally, I have seen a coding style that depends on comments *not*
nesting. You might have these lines:
puts("line one"); /* line one */
puts("line two"); /* line two */
puts("line three"); /* line three */
and if you want to comment out line two, you can insert a single
comment delimiter:
puts("line one"); /* line one */
/* puts("line two"); /* line two */
puts("line three"); /* line three */
I'm not saying that this is a particularly good idea, but it
does exist.
--
Keith Thompson (The_Other_Keith) kst-u@mib.org <http://www.ghoti.net/~kst>
Working, but not speaking, for JetHead Development, Inc.
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"
Back to comp.lang.c | Previous | Next — Previous in thread | Next in thread | Find similar
Re: "C's Biggest Mistake" bartc <bc@freeuk.com> - 2018-04-04 22:56 +0100
Re: "C's Biggest Mistake" jacobnavia <jacob@jacob.remcomp.fr> - 2018-04-05 00:45 +0200
Re: "C's Biggest Mistake" Jorgen Grahn <grahn+nntp@snipabacken.se> - 2018-04-04 23:07 +0000
Re: "C's Biggest Mistake" bartc <bc@freeuk.com> - 2018-04-05 01:29 +0100
Re: "C's Biggest Mistake" jacobnavia <jacob@jacob.remcomp.fr> - 2018-04-06 00:10 +0200
Re: "C's Biggest Mistake" bartc <bc@freeuk.com> - 2018-04-05 23:48 +0100
Re: "C's Biggest Mistake" scott@slp53.sl.home (Scott Lurndal) - 2018-04-05 13:31 +0000
Re: "C's Biggest Mistake" Robert Wessel <robertwessel2@yahoo.com> - 2018-04-05 09:48 -0500
Re: "C's Biggest Mistake" Tim Rentsch <txr@alumni.caltech.edu> - 2018-04-08 16:37 -0700
Re: "C's Biggest Mistake" Keith Thompson <kst-u@mib.org> - 2018-04-08 18:58 -0700
Re: "C's Biggest Mistake" already5chosen@yahoo.com - 2018-04-09 00:56 -0700
Re: "C's Biggest Mistake" Steven Petruzzellis <frelwizzen@gmail.com> - 2018-04-09 01:59 -0700
Re: "C's Biggest Mistake" mark.bluemel@gmail.com - 2018-04-09 02:36 -0700
Re: "C's Biggest Mistake" Steven Petruzzellis <frelwizzen@gmail.com> - 2018-04-09 03:49 -0700
Re: "C's Biggest Mistake" bartc <bc@freeuk.com> - 2018-04-09 12:14 +0100
Re: "C's Biggest Mistake" mark.bluemel@gmail.com - 2018-04-09 04:40 -0700
Re: "C's Biggest Mistake" Robert Wessel <robertwessel2@yahoo.com> - 2018-04-09 22:21 -0500
Re: "C's Biggest Mistake" Steven Petruzzellis <frelwizzen@gmail.com> - 2018-04-09 21:37 -0700
Re: "C's Biggest Mistake" Wouter Verhelst <w@uter.be> - 2018-04-10 11:51 +0200
Re: "C's Biggest Mistake" Steven Petruzzellis <frelwizzen@gmail.com> - 2018-04-10 07:15 -0700
Re: "C's Biggest Mistake" already5chosen@yahoo.com - 2018-04-10 11:50 -0700
Re: "C's Biggest Mistake" bartc <bc@freeuk.com> - 2018-04-09 11:55 +0100
Re: "C's Biggest Mistake" bartc <bc@freeuk.com> - 2018-04-05 17:26 +0100
Re: "C's Biggest Mistake" scott@slp53.sl.home (Scott Lurndal) - 2018-04-05 17:32 +0000
Re: "C's Biggest Mistake" Keith Thompson <kst-u@mib.org> - 2018-04-05 11:05 -0700
Re: "C's Biggest Mistake" David Brown <david.brown@hesbynett.no> - 2018-04-06 10:06 +0200
Re: "C's Biggest Mistake" bartc <bc@freeuk.com> - 2018-04-05 19:09 +0100
Re: "C's Biggest Mistake" Keith Thompson <kst-u@mib.org> - 2018-04-05 11:23 -0700
Re: "C's Biggest Mistake" bartc <bc@freeuk.com> - 2018-04-05 20:21 +0100
Re: "C's Biggest Mistake" supercat@casperkitty.com - 2018-04-05 12:30 -0700
Re: "C's Biggest Mistake" Keith Thompson <kst-u@mib.org> - 2018-04-05 13:39 -0700
Re: "C's Biggest Mistake" supercat@casperkitty.com - 2018-04-05 14:15 -0700
Re: "C's Biggest Mistake" Keith Thompson <kst-u@mib.org> - 2018-04-05 14:53 -0700
Re: "C's Biggest Mistake" supercat@casperkitty.com - 2018-04-05 15:08 -0700
Re: "C's Biggest Mistake" Robert Wessel <robertwessel2@yahoo.com> - 2018-04-05 16:34 -0500
Re: "C's Biggest Mistake" scott@slp53.sl.home (Scott Lurndal) - 2018-04-05 19:01 +0000
Re: "C's Biggest Mistake" bartc <bc@freeuk.com> - 2018-04-05 20:50 +0100
Re: "C's Biggest Mistake" scott@slp53.sl.home (Scott Lurndal) - 2018-04-05 20:25 +0000
Re: "C's Biggest Mistake" bartc <bc@freeuk.com> - 2018-04-05 22:07 +0100
Re: "C's Biggest Mistake" Wouter Verhelst <w@uter.be> - 2018-04-05 22:20 +0200
Re: "C's Biggest Mistake" jameskuyper@verizon.net - 2018-04-05 19:50 -0700
Re: "C's Biggest Mistake" Wouter Verhelst <w@uter.be> - 2018-04-06 11:08 +0200
Re: "C's Biggest Mistake" Steven Petruzzellis <frelwizzen@gmail.com> - 2018-04-06 04:24 -0700
Re: "C's Biggest Mistake" Jorgen Grahn <grahn+nntp@snipabacken.se> - 2018-04-12 12:35 +0000
Re: "C's Biggest Mistake" bartc <bc@freeuk.com> - 2018-04-12 14:02 +0100
Re: "C's Biggest Mistake" Ian Collins <ian-news@hotmail.com> - 2018-04-13 07:18 +1200
Re: "C's Biggest Mistake" scott@slp53.sl.home (Scott Lurndal) - 2018-04-12 20:12 +0000
Re: "C's Biggest Mistake" bartc <bc@freeuk.com> - 2018-04-12 22:20 +0100
Re: "C's Biggest Mistake" Ian Collins <ian-news@hotmail.com> - 2018-04-13 09:35 +1200
Re: "C's Biggest Mistake" supercat@casperkitty.com - 2018-04-12 14:47 -0700
Re: "C's Biggest Mistake" Keith Thompson <kst-u@mib.org> - 2018-04-12 15:19 -0700
Re: "C's Biggest Mistake" bartc <bc@freeuk.com> - 2018-04-13 01:44 +0100
Re: "C's Biggest Mistake" Wouter Verhelst <w@uter.be> - 2018-04-13 13:04 +0200
Re: "C's Biggest Mistake" Ed Kellett <e@kellett.im> - 2018-04-13 12:30 +0100
Re: "C's Biggest Mistake" Steven Petruzzellis <frelwizzen@gmail.com> - 2018-04-13 05:22 -0700
Re: "C's Biggest Mistake" bartc <bc@freeuk.com> - 2018-04-13 12:40 +0100
Re: "C's Biggest Mistake" Wouter Verhelst <w@uter.be> - 2018-04-13 14:14 +0200
Re: "C's Biggest Mistake" bartc <bc@freeuk.com> - 2018-04-13 13:53 +0100
Re: "C's Biggest Mistake" scott@slp53.sl.home (Scott Lurndal) - 2018-04-13 13:52 +0000
Re: "C's Biggest Mistake" Jorgen Grahn <grahn+nntp@snipabacken.se> - 2018-04-13 15:25 +0000
Re: "C's Biggest Mistake" Steven Petruzzellis <frelwizzen@gmail.com> - 2018-04-13 08:45 -0700
Re: "C's Biggest Mistake" Keith Thompson <kst-u@mib.org> - 2018-04-13 08:58 -0700
Re: "C's Biggest Mistake" scott@slp53.sl.home (Scott Lurndal) - 2018-04-13 16:24 +0000
Re: "C's Biggest Mistake" bartc <bc@freeuk.com> - 2018-04-13 18:09 +0100
Re: "C's Biggest Mistake" Keith Thompson <kst-u@mib.org> - 2018-04-13 10:26 -0700
Re: "C's Biggest Mistake" "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2018-04-13 11:48 -0400
Re: "C's Biggest Mistake" scott@slp53.sl.home (Scott Lurndal) - 2018-04-13 13:50 +0000
Re: "C's Biggest Mistake" bartc <bc@freeuk.com> - 2018-04-13 16:00 +0100
Re: "C's Biggest Mistake" Keith Thompson <kst-u@mib.org> - 2018-04-13 09:03 -0700
Re: "C's Biggest Mistake" "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2018-04-13 12:06 -0400
Re: "C's Biggest Mistake" bartc <bc@freeuk.com> - 2018-04-13 18:04 +0100
Re: "C's Biggest Mistake" Keith Thompson <kst-u@mib.org> - 2018-04-13 10:09 -0700
Re: "C's Biggest Mistake" bartc <bc@freeuk.com> - 2018-04-13 18:14 +0100
Re: "C's Biggest Mistake" David Brown <david.brown@hesbynett.no> - 2018-04-14 12:56 +0200
Re: "C's Biggest Mistake" Richard Damon <Richard@Damon-Family.org> - 2018-04-14 12:34 -0400
Re: "C's Biggest Mistake" jameskuyper@verizon.net - 2018-04-14 09:59 -0700
Re: "C's Biggest Mistake" Keith Thompson <kst-u@mib.org> - 2018-04-14 12:51 -0700
Re: "C's Biggest Mistake" Ike Naar <ike@iceland.freeshell.org> - 2018-04-15 18:52 +0000
Re: "C's Biggest Mistake" Keith Thompson <kst-u@mib.org> - 2018-04-15 12:39 -0700
Re: "C's Biggest Mistake" Steven Petruzzellis <frelwizzen@gmail.com> - 2018-04-16 00:56 -0700
Re: "C's Biggest Mistake" Steven Petruzzellis <frelwizzen@gmail.com> - 2018-04-15 21:49 -0700
Re: "C's Biggest Mistake" bartc <bc@freeuk.com> - 2018-04-12 22:34 +0100
Re: "C's Biggest Mistake" Ian Collins <ian-news@hotmail.com> - 2018-04-13 09:50 +1200
Re: "C's Biggest Mistake" bartc <bc@freeuk.com> - 2018-04-12 23:16 +0100
Re: "C's Biggest Mistake" Ian Collins <ian-news@hotmail.com> - 2018-04-13 10:30 +1200
Re: "C's Biggest Mistake" bartc <bc@freeuk.com> - 2018-04-12 23:42 +0100
Re: "C's Biggest Mistake" Ian Collins <ian-news@hotmail.com> - 2018-04-13 10:46 +1200
Re: "C's Biggest Mistake" bartc <bc@freeuk.com> - 2018-04-13 01:21 +0100
Re: "C's Biggest Mistake" Reinhardt Behm <rbehm@hushmail.com> - 2018-04-13 09:04 +0800
Re: "C's Biggest Mistake" bartc <bc@freeuk.com> - 2018-04-13 02:14 +0100
Re: "C's Biggest Mistake" David Brown <david.brown@hesbynett.no> - 2018-04-13 10:03 +0200
Re: "C's Biggest Mistake" Steven Petruzzellis <frelwizzen@gmail.com> - 2018-04-13 02:46 -0700
Re: "C's Biggest Mistake" bartc <bc@freeuk.com> - 2018-04-13 11:22 +0100
Re: "C's Biggest Mistake" David Brown <david.brown@hesbynett.no> - 2018-04-13 13:45 +0200
Re: "C's Biggest Mistake" bartc <bc@freeuk.com> - 2018-04-13 13:44 +0100
Re: "C's Biggest Mistake" David Brown <david.brown@hesbynett.no> - 2018-04-13 15:18 +0200
Re: "C's Biggest Mistake" bartc <bc@freeuk.com> - 2018-04-13 18:27 +0100
Re: "C's Biggest Mistake" Ian Collins <ian-news@hotmail.com> - 2018-04-13 13:43 +1200
Re: "C's Biggest Mistake" Reinhardt Behm <rbehm@hushmail.com> - 2018-04-13 08:55 +0800
Re: "C's Biggest Mistake" Steven Petruzzellis <frelwizzen@gmail.com> - 2018-04-12 06:04 -0700
Re: "C's Biggest Mistake" Malcolm McLean <malcolm.arthur.mclean@gmail.com> - 2018-04-12 06:09 -0700
Re: "C's Biggest Mistake" Robert Wessel <robertwessel2@yahoo.com> - 2018-04-05 16:44 -0500
Re: "C's Biggest Mistake" David Brown <david.brown@hesbynett.no> - 2018-04-06 14:46 +0200
Re: "C's Biggest Mistake" Steven Petruzzellis <frelwizzen@gmail.com> - 2018-04-06 05:57 -0700
Re: "C's Biggest Mistake" bartc <bc@freeuk.com> - 2018-04-06 14:31 +0100
Re: "C's Biggest Mistake" David Brown <david.brown@hesbynett.no> - 2018-04-06 16:23 +0200
Re: "C's Biggest Mistake" Richard Damon <Richard@Damon-Family.org> - 2018-04-06 10:58 -0400
Re: "C's Biggest Mistake" scott@slp53.sl.home (Scott Lurndal) - 2018-04-06 15:46 +0000
Re: "C's Biggest Mistake" bartc <bc@freeuk.com> - 2018-04-06 16:18 +0100
Re: "C's Biggest Mistake" Steven Petruzzellis <frelwizzen@gmail.com> - 2018-04-06 23:01 -0700
csiph-web