comp.lang.ada
 help / color / mirror / Atom feed
From: gautier_niouzes@hotmail.com
Subject: Re: Is there a way to do large block of source code comments
Date: Wed, 3 Sep 2014 14:47:44 -0700 (PDT)
Date: 2014-09-03T14:47:44-07:00	[thread overview]
Message-ID: <98bd4dbe-7762-48ec-80b8-c1cec80c489e@googlegroups.com> (raw)
In-Reply-To: <766dc3c7-916b-488c-813c-8aee8b05ca0f@googlegroups.com>

Le mercredi 3 septembre 2014 20:53:01 UTC+2, Adam Beneschan a écrit :

> I don't see why not.  The language designers would have to come up with some simple rules, but this isn't hard:
> 
> The sequence (*, if not in a conventional comment, starts a block comment.  The comment ends with the next occurrence of the sequence *) that is not in a conventional comment.  Within a block comment, it is illegal for the sequence (* to appear except in a conventional comment.  A character sequence is "in a conventional comment" if it occurs anywhere between the sequence -- and the nearest subsequent end-of-line character. 

Hey, not so easy! If you admit (* in a conventional comment within a block comment, then you need to specify that a *) is closing the nested (*, or perhaps not (then it would be closing the outer block comment), and also what happens if a *) is in a conventional comment but a one or more rows later. Is it closing the nested (* or the outer one ? Of course the question goes recursively with nesting...

I have some memories of headaches in the 80's or 90's when I was programming in Pascal with *) closing a {, or not, and so on. And I'm happy not having to deal with these block comments since then.

These block comments become very quickly very messy, especially because there may be unforeseen cases in the specification ( :-) ), and even if the specification is bullet-proof, compilers, parsers, editors or pretty printers may easily misinterpret the rules...
_________________________
Gautier's Ada programming
http://gautiersblog.blogspot.com/search/label/Ada
NB: follow the above link for a valid e-mail address


  reply	other threads:[~2014-09-03 21:47 UTC|newest]

Thread overview: 48+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-01 17:24 Is there a way to do large block of source code comments gdotone
2014-09-01 19:04 ` Jeffrey Carter
2014-09-03  0:07   ` robin.vowels
2014-09-03  0:44     ` Jeffrey Carter
2014-09-03  1:15       ` gdotone
2014-09-03  4:17         ` J-P. Rosen
2014-09-03  8:04       ` Brian Drummond
2014-09-03  0:50     ` Adam Beneschan
2014-09-04  2:30       ` robin.vowels
2014-09-04 15:12         ` Adam Beneschan
2014-09-03  8:22     ` Georg Bauhaus
2014-09-03  8:28     ` Stefan.Lucks
2014-09-03  8:23       ` gdotone
2014-09-03  8:57         ` Pascal Obry
2014-09-03 15:12           ` Stefan.Lucks
2014-09-03 15:52             ` Pascal Obry
2014-09-03 17:48               ` Georg Bauhaus
2014-09-03 18:28                 ` Peter Chapin
2014-09-03 18:52               ` Adam Beneschan
2014-09-03 21:47                 ` gautier_niouzes [this message]
     [not found]                   ` <91e173a8-7451-4609-b141-ce3c6b19455f@googlegroups.com>
2014-09-04  5:56                     ` Pascal Obry
2014-09-03 22:42                 ` Georg Bauhaus
2014-09-03 21:02               ` Stefan.Lucks
2014-10-01 21:15                 ` Randy Brukardt
2014-09-03 16:58       ` Jeffrey Carter
2014-09-04 18:19       ` Keith Thompson
2014-09-03 15:32     ` Shark8
2014-09-04  2:37       ` robin.vowels
2014-09-04  7:20         ` Georg Bauhaus
2014-09-04 12:46           ` robin.vowels
2014-09-04 15:44             ` G.B.
2014-09-12  2:52         ` Shark8
2014-09-01 19:08 ` Niklas Holsti
2014-09-01 20:34   ` G.B.
2014-09-01 20:53     ` Niklas Holsti
2014-09-02 13:14       ` G.B.
2014-09-02 14:38         ` kalvin.news
2014-09-02 23:33         ` Randy Brukardt
2014-09-03  8:17           ` Georg Bauhaus
2014-09-01 21:15   ` Simon Wright
2014-09-02 15:01   ` Adam Beneschan
2014-09-02 16:35     ` Simon Wright
2014-09-02 17:14     ` Jeffrey Carter
2014-09-02 19:02     ` Niklas Holsti
2014-09-02 20:10       ` mockturtle
2014-09-02 23:36     ` Randy Brukardt
2014-09-01 19:13 ` Anh Vo
2014-09-01 21:04 ` gdotone
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox