comp.lang.ada
 help / color / mirror / Atom feed
From: Brian Drummond <brian@shapes.demon.co.uk>
Subject: Re: Ada and Java/C++
Date: Wed, 29 Aug 2012 10:39:17 +0000 (UTC)
Date: 2012-08-29T10:39:17+00:00	[thread overview]
Message-ID: <k1krgl$aad$1@dont-email.me> (raw)
In-Reply-To: fouq38tqdp7fh86l2dp2pmr8jfdgi24i7j@invalid.netcom.com

On Tue, 28 Aug 2012 22:22:54 -0400, Dennis Lee Bieber wrote:

> On Tue, 28 Aug 2012 23:00:27 +0000 (UTC), Brian Drummond
> <brian@shapes.demon.co.uk> declaimed the following in comp.lang.ada:
> 
> 
>> However the error report would originate in the compiler - not the
>> preprocessor - and therefore it would be on the generated Ada (with a
>> post-processor nod to the original code). It would say "missing } : end
>> if" or such, and the coder would be responsible for counting his }}}}s.
>>
> 	But it can't be sure which is missing if one has a nested mix --
> there is the possibility that, if a "end if" } is missing, the next }
> (meant for an "end loop") is taken to be the "end if", and the error for
> the "missing" "end loop" is only reported at the end of the procedure.
> Whereas Ada would detect the missing "end if" when it parses the "end
> loop".

Indeed so. When the preprocessor generates Ada, it would place "end if" 
in the place of "end loop", and it would be up to the programmer to 
notice that it was in the wrong place. If the code is suitably written, 
the indentation might make that clear, but there are no guarantees of 
that!

One can hope that the programmer would soon learn the advantages of Ada's 
uncannily accurate error messages, and take off the training wheels.

- Brian



  parent reply	other threads:[~2012-08-29 10:39 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-27 10:46 Ada and Java/C++ kalvin.news
2012-08-27 11:48 ` Dmitry A. Kazakov
2012-08-27 13:44   ` kalvin.news
2012-08-27 14:33     ` Dmitry A. Kazakov
2012-08-27 15:26     ` J-P. Rosen
2012-08-27 15:46       ` Georg Bauhaus
2012-08-27 16:08       ` kalvin.news
2012-08-27 23:16     ` Randy Brukardt
2012-08-28  2:14       ` Adam Beneschan
2012-08-28 10:50         ` Brian Drummond
2012-08-28 14:22           ` kalvin.news
     [not found]           ` <gcup38ldi4afrt9q2uj70qoe7l2lcn4rk1@invalid.netcom.com>
2012-08-28 23:00             ` Brian Drummond
     [not found]               ` <fouq38tqdp7fh86l2dp2pmr8jfdgi24i7j@invalid.netcom.com>
2012-08-29 10:39                 ` Brian Drummond [this message]
2012-08-27 14:35   ` Nomen Nescio
2012-08-27 21:23     ` gautier_niouzes
2012-08-27 14:09 ` Niklas Holsti
     [not found] ` <al1n38tdd0tq6p1os6p6angt91mginhoup@invalid.netcom.com>
2012-08-27 14:49   ` kalvin.news
2012-08-27 14:53   ` kalvin.news
2012-08-27 19:46     ` Shark8
2012-08-27 20:11     ` gautier_niouzes
2012-08-27 19:41 ` Shark8
2012-08-27 20:06 ` gautier_niouzes
2012-08-28  5:35 ` kalvin.news
2012-08-28  6:57   ` Shark8
2012-08-28  8:28     ` kalvin.news
2012-08-28 10:00       ` Niklas Holsti
2012-08-28  8:31     ` kalvin.news
2012-08-28  9:15       ` Niklas Holsti
2012-08-28  9:54   ` gautier_niouzes
2012-08-28 14:08     ` kalvin.news
2012-08-29 10:52 ` kalvin.news
replies disabled

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