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,b8b8a54001adc4d2 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news3.google.com!newsfeed2.dallas1.level3.net!news.level3.com!newsfeed-00.mathworks.com!nntp.TheWorld.com!not-for-mail From: Robert A Duff Newsgroups: comp.lang.ada Subject: Re: Possible Ada deficiency? (goto) Date: 15 Jan 2005 14:34:06 -0500 Organization: The World Public Access UNIX, Brookline, MA Message-ID: References: <1104516913.718856.94090@z14g2000cwz.googlegroups.com> <1104544963.930877.75170@c13g2000cwb.googlegroups.com> <1104595073.731663.180100@c13g2000cwb.googlegroups.com> <18fnarb48z32c$.1feg4z2euai5i$.dlg@40tude.net> NNTP-Posting-Host: shell01-e.theworld.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: pcls4.std.com 1105817646 1606 69.38.147.31 (15 Jan 2005 19:34:06 GMT) X-Complaints-To: abuse@TheWorld.com NNTP-Posting-Date: Sat, 15 Jan 2005 19:34:06 +0000 (UTC) User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 Xref: g2news1.google.com comp.lang.ada:7828 Date: 2005-01-15T14:34:06-05:00 List-Id: "Dmitry A. Kazakov" writes: > On 15 Jan 2005 12:34:59 -0500, Robert A Duff wrote: > > > procedure P is > > --(1) > > begin > > for Mumble in 1..10 loop > > <> --(2) > > null; > > end loop; > > end P; > > > > Here's why the above is illegal: There is an implicit declaration of > > label Mumble at that place marked "--(1)". > > Why not in the loop's body? After all one cannot jump into the loop body? I don't know. Perhaps because the rules for goto labels are the same as for block names, and maybe it makes expanded names work better. > > At the place marked "--(2)", > > this this declaration is not directly visible, because it is hidden by > > the loop parameter Mumble. Thus, the reference to Mumble at "--(2)" > > is illegal. That's just plain weird. > > Interesting is that labels, types and objects share the same name space. Seems like the simplest rule, for both programmer and compiler. > For labels it looks as if somebody planned to implement FORTRAN's: > > ASSIGN 100 K > ... > GOTO K > > (I like that language! (:-)) ;-) - Bob