comp.lang.ada
 help / color / mirror / Atom feed
From: ncohen@watson.ibm.com (Norman H. Cohen)
Subject: Re: Systemless use of 'Address.
Date: 14 Nov 1994 21:36:43 GMT
Date: 1994-11-14T21:36:43+00:00	[thread overview]
Message-ID: <3a8l9b$10rk@watnews1.watson.ibm.com> (raw)
In-Reply-To: 9411101514.AA21438@eurocontrol.de

In article <9411101514.AA21438@eurocontrol.de>, Bob Wells #402
<wel@EUROCONTROL.DE> writes: 

|> G'day,
|>
|> Given the following procedure declaration: 
|>
|>   procedure Display_Code2String (
|>     Data_Address : in     System.Address;
|>     Data_Size    : in     Natural;
|>     Data         : in out String_Ptr;
|>     Length       : in out Natural;
|>     Append       : in     Boolean := False);
|>
|>
|> and the following call to the procedure
|>
|>         Draw.Display_Code2String ( Data_Address => Tmp_String'Address,
|>                                    Data_Size    => Tmp_String'Size,
|>                                    Data         => Return_String,
|>                                    Length       => Return_String_Length );
|>
|> Why does the Verdix compiler (sorry specifically the
|>
|> Verdix Ada Compiler, Copyright 1984, 1992
|> VADSworks for Sun-4 -> MC68020/30/vxWorks, (VADS 6.0.5)
|> Mon Aug 17 09:11:00 EST 1992 2.0.3(b)
|>
|> accept this procedyre call **without** the a with clause for the package
|> System?
|>
|> But if I add
|>
|>         Tmp_String : EDD_Code_String ( 1 .. (Integer(Tmp_Seq.All'Last)/3 + 1));
|>         for Tmp_String use at Tmp_Seq.All'Address;
|>
|> it now will only compile the package without errors if I "with" System?

AI-00043, a binding interpretation approved by WG9 in June 1990, states,
"The attribute ADDRESS can only be used in compilation unit if a with
clause naming the predefined package SYSTEM has been given either for the
compilation unit itself or for a compilation unit on which the current
unit depends (directly or indirectly)."

Did you add the address clause to the same compilation unit that had
the procedure call, or are they two different units?  If they are two
different units, it could be that the unit containing the procedure call,
even though it did not have its own with clause for System, depended on
some unit that did have such a with clause.  According to the AI, it is
sufficient to have a with clause for a unit that has a with clause for a
unit that has a with clause for a unit that has a with clause for System.

--
Norman H. Cohen    ncohen@watson.ibm.com



  parent reply	other threads:[~1994-11-14 21:36 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1994-11-10 15:14 Systemless use of 'Address Bob Wells #402
1994-11-11 20:32 ` Cary Jamison
1994-11-12 20:38   ` Robert Dewar
1994-11-14 21:36 ` Norman H. Cohen [this message]
1994-11-16 16:11   ` Mats Weber
1994-11-16 23:50     ` Robert Dewar
1994-11-17 22:35       ` Keith Thompson
1994-11-17  1:41     ` Bob Duff
replies disabled

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