From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=0.7 required=5.0 tests=BAYES_00,INVALID_DATE, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,682ac581ea925e5 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 1994-11-14 17:11:27 PST Path: nntp.gmd.de!xlink.net!howland.reston.ans.net!swiss.ans.net!newsgate.watson.ibm.com!watnews.watson.ibm.com!ncohen From: ncohen@watson.ibm.com (Norman H. Cohen) Newsgroups: comp.lang.ada Subject: Re: Systemless use of 'Address. Date: 14 Nov 1994 21:36:43 GMT Organization: IBM T.J. Watson Research Center Distribution: world Message-ID: <3a8l9b$10rk@watnews1.watson.ibm.com> References: <9411101514.AA21438@eurocontrol.de> Reply-To: ncohen@watson.ibm.com NNTP-Posting-Host: rios8.watson.ibm.com Date: 1994-11-14T21:36:43+00:00 List-Id: In article <9411101514.AA21438@eurocontrol.de>, Bob Wells #402 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