From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,7b5615402713dcbb X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.181.11.234 with SMTP id el10mr269032wid.2.1346236757793; Wed, 29 Aug 2012 03:39:17 -0700 (PDT) X-FeedAbuse: http://nntpfeed.proxad.net/abuse.pl feeded by 88.191.116.97 Path: q11ni373428422wiw.1!nntp.google.com!feeder1-2.proxad.net!proxad.net!feeder2-2.proxad.net!nntpfeed.proxad.net!dedibox.gegeweb.org!gegeweb.eu!gegeweb.org!eternal-september.org!feeder.eternal-september.org!mx04.eternal-september.org!.POSTED!not-for-mail From: Brian Drummond Newsgroups: comp.lang.ada Subject: Re: Ada and Java/C++ Date: Wed, 29 Aug 2012 10:39:17 +0000 (UTC) Organization: A noiseless patient Spider Message-ID: References: <8bfbf709-18ac-43cd-b037-ce47adde96c2@googlegroups.com> <1dy5xgqtdqpp6$.qio4t8fjk8b5.dlg@40tude.net> <513d6efb-6aad-4013-8b21-37c75aa6aaf7@googlegroups.com> Mime-Version: 1.0 Injection-Date: Wed, 29 Aug 2012 10:39:17 +0000 (UTC) Injection-Info: mx04.eternal-september.org; posting-host="0e44dd4a3c4e0a6e83a86f947fb780ae"; logging-data="10573"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+s3RXmSf6sc4DjnZQ1yZ41EAfi55j0sWE=" User-Agent: Pan/0.135 (Tomorrow I'll Wake Up and Scald Myself with Tea; GIT 30dc37b master) Cancel-Lock: sha1:nUGb6bOsba9ibmYn62w5Icb+EyY= Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Date: 2012-08-29T10:39:17+00:00 List-Id: 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 > 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