comp.lang.ada
 help / color / mirror / Atom feed
From: rich@wilbur.coyote.trw.com (Rich Messenger)
Subject: Re: Language lawyer needed
Date: Fri, 2 Apr 1993 23:07:17 GMT
Date: 1993-04-02T23:07:17+00:00	[thread overview]
Message-ID: <1993Apr2.230717.7881@wilbur.coyote.trw.com> (raw)
In-Reply-To: 1993Apr1.215753.3147@oracorp.com

davidg@oracorp.com (David Guaspari) writes:

>Here's a question for language lawyers.

>Consider the following pathological program:

>   procedure Q(x : integer) is  
>   begin
>     declare
>       x : integer;   -- (1)
>     begin
>       Q(x => 0);     -- (2)
>     end;
>   end Q;

>My question concerns the legality of Q (forgetting about the fact that
>its execution won't terminate).  One way to apply chapter 8 in the
>reference manual goes as follows: [omitted]

I'm no language lawyer, but I looked this up in the LRM index and found
the following rule which explains why this works:

    8.3.6: Visibility is either by selection or direct. A
    declaration is visible by selection at places that are defined
    as follows:
    ...
    (e) For a parameter specification of a given subprogram
    specification or entry declaration: at the place of the formal
    parameter (before the compound delimiter =>) in a named
    parameter association of a corresponding subprogram or entry
    call.

In other words, in the named parameter association "x" is considered to
be selected in the same sense that dot notation can be used to select a
declaration from the visible part of a package declaration.
-- 
     _ __
    ' )  )      /                      Rich Messenger
     /--' o _. /_                      rich@wilbur.coyote.trw.com
    /  \_(_(__/ /_                     ...!{uunet,cit-vax,trwrb}!wiley!rich



  parent reply	other threads:[~1993-04-02 23:07 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1993-04-01 21:57 Language lawyer needed 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 [this message]
  -- strict thread matches above, loose matches on Subject: below --
1993-04-02 15:39 Mike Berman
1993-04-02 16:39 Wes Groleau X7574
1993-04-07 22:34 agate!howland.reston.ans.net!zaphod.mps.ohio-state.edu!pacific.mps.ohio-s
1993-04-08 18:10 Robert I. Eachus
1993-04-09 22:33 cis.ohio-state.edu!zaphod.mps.ohio-state.edu!howland.reston.ans.net!noc.n
replies disabled

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