comp.lang.ada
 help / color / mirror / Atom feed
From: agate!howland.reston.ans.net!zaphod.mps.ohio-state.edu!pacific.mps.ohio-s
Subject: Re: Language lawyer needed
Date: 7 Apr 93 22:34:49 GMT	[thread overview]
Message-ID: <1993Apr7.183449.21551@sei.cmu.edu> (raw)

Dave Collard writes:

> The 'x' in (2) does not refer to a variable -- it is part of a named
> parameter association and has nothing to do with the visibility of either
> the formal parameter 'x' or the 'x' declared in (1). ...

   Half right:  it has everything to do with the formal parameter, whose
specification is the only applicable visible (by selection) declaration
of 'x' at that point!

Tuck writes:

TT >  However, the declaration in (1) is not visible by selection at the
TT >  point at which x occurs in (2).
TT
TT This statement is false.  Which paragraph in RM 8.3 made you think
TT it was true?  Curious revisers of 8.3 want to know...

NOT (which flip-flops the "false" asserted above, of course).  Indeed, I'll
argue that at the (precise) point of 'x' in "Q(x=>0);", the variable "x"
declaration is not visible at all (and thus that 8.3(14) ought to read

	A declaration is directly visible within a certain part
	of its immediate scope [which] extends to the end of the
	immediate scope of the declaration, but excludes places where the
	declaration is hidden as explained below or where visibility is
	determined by selection as explained above. ~~~~~~~~~~~~~~~~~~~
	~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

The relevant prg.s are:  8.3(6..12), 8.3(13), & 6.4(3).

  By 8.3(6..12), one finds no rules for visibility-by-selection that apply
  to the variable declaration "x".

  Which leaves only 8.3(14)'s "Finally, ..." as the one chance for vis-by-sel.
  But by 6.4(3) the only allowable name "at the point at which x occurs in (2)"
  is a name of a formal paramenter, right!?  So variable decl. "x" cannot be
  vis-by-sel at the point immediately between a subprogram call's left paren
  and compound delimiter '=>' in the parameter association.

   If you hold that variable declaration "x" is visible at all, and obviously
formal parameter specification "x" is also, don't you then contradict/conflict
with 8.3(4), which allows more than one meaning if and only if the identifier
is acceptable according to overloading rules (which don't apply in this case)?
Curious readers of 8.3 want to know, too!  (This is the reason for the tilde
underscored revision to 8.3 above.  Maybe 8.3(6) intends to say this, that
only one type of visibility is available at any given point; I read it to say
rather/simply that there are two types of visibility (and maybe at point P
each can be applied and yield ambiguity (in "package P is A : integer := 0;
B : integer := P.A; ... " this last A refers to the same decl. by either type
of visibility, and is thus not ambiguous)!?)

---Dan
------- *

             reply	other threads:[~1993-04-07 22:34 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1993-04-07 22:34 agate!howland.reston.ans.net!zaphod.mps.ohio-state.edu!pacific.mps.ohio-s [this message]
  -- strict thread matches above, loose matches on Subject: below --
1993-04-09 22:33 Language lawyer needed cis.ohio-state.edu!zaphod.mps.ohio-state.edu!howland.reston.ans.net!noc.n
1993-04-08 18:10 Robert I. Eachus
1993-04-02 16:39 Wes Groleau X7574
1993-04-02 15:39 Mike Berman
1993-04-01 21:57 David Guaspari
1993-04-02 13:57 ` Dave Collard x7468
1993-04-02 16:40 ` Robert I. Eachus
1993-04-02 19:37 ` Tucker Taft
1993-04-02 23:07 ` Rich Messenger
replies disabled

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