comp.lang.ada
 help / color / mirror / Atom feed
* ambiguous names
@ 2002-08-20 14:50 Maxim Reznik
  2002-08-20 15:15 ` David C. Hoos
  0 siblings, 1 reply; 4+ messages in thread
From: Maxim Reznik @ 2002-08-20 14:50 UTC (permalink / raw)


Trying to understand paragraph 4.1.3.13 of ARM:

* If the prefix does not denote a package, then it shall be a 
*direct_name or an expanded name, and it shall resolve to denote a 
*program unit (other than a package), the current instance of a type, a 
*block_statement, a loop_statement, or an accept_statement (in the case 
*of an accept_statement or entry_body, no family index is allowed); the 
*expanded name shall occur within the declarative region of this 
*construct. Further, if this construct is a callable construct and the 
*prefix denotes more than one such enclosing callable construct, then 
*the expanded name is ambiguous, independently of the selector_name.

I wroute a program:

procedure A is
    B : Boolean;
    X : Integer;

    procedure A is
       B : Integer;
    begin
       X := A.B;  -- ambiguous ?
    end A;

begin
    null;
end A;

I think there is an ambiguous name A.B in assignment statement.
"A" denotes two procedures and they are callable constructs.
But GNAT doesnt complain.

Could Ada lawyers explain me my fault and/or give me an example
of ambiguity of a prefix?

Please





^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2002-08-21  7:05 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-08-20 14:50 ambiguous names Maxim Reznik
2002-08-20 15:15 ` David C. Hoos
2002-08-20 17:55   ` Pascal Obry
2002-08-21  7:05   ` Maxim Reznik

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