From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.5-pre1 (2020-06-20) on ip-172-31-74-118.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-1.9 required=3.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.5-pre1 Date: 9 Apr 93 22:33:40 GMT From: cis.ohio-state.edu!zaphod.mps.ohio-state.edu!howland.reston.ans.net!noc.n ear.net!inmet!spock!stt@ucbvax.Berkeley.EDU (Tucker Taft) Subject: Re: Language lawyer needed Message-ID: <1993Apr9.223340.26114@inmet.camb.inmet.com> List-Id: In article <1993Apr2.193753.22289@inmet.camb.inmet.com> stt@spock.camb.inmet.com (Tucker Taft) writes: >In article <1993Apr1.215753.3147@oracorp.com> > davidg@oracorp.com (David Guaspari) writes: > >>Here's a question for language lawyers. > >Oh boy. > >>Consider the following pathological program: >> >> procedure Q(x : integer) is >> begin >> declare >> x : integer; -- (1) >> begin >> Q(x => 0); -- (2) >> end; >> end Q; >> >> . . . >> However, the declaration in (1) is not visible by selection at the >> point at which x occurs in (2). > >This statement is false. Oops; I misread David's original sentence -- it is in fact true. The declaration in (1) is not visible by selection preceding the "=>" in (2). (My misreading had replaced "the declaration in (1)" with "the first declaration of x".) The basic confusion illustrated by David's message comes from the word "hide" which does *not* imply the earlier declaration is "invisible" but rather simply not *directly* visible (I guess it is "indirectly visible" ;-). On the other hand, "hide from *all* visibility" does mean the declaration is visible neither directly nor by selection. This more "obscure" (so to speak) kind of hiding only happens in a few cases (within a subprogram specification, and for implicit declarations overridden by explicit declarations). It is probably best to just ignore these obscure cases when trying to build an "intuition" for what the word "hide" means in Ada. (Perhaps a better word for "hide" might be the verb "obscure" ;-) >>- David Guaspari >> davidg@oracorp.com > >S. Tucker Taft stt@inmet.com >Ada 9X Mapping/Revision Team >Intermetrics, Inc. >Cambridge, MA 02138 -S. T. Taft