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=-1.9 required=5.0 tests=BAYES_00 autolearn=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail From: "J-P. Rosen" Newsgroups: comp.lang.ada Subject: Re: Put the access value Date: Tue, 14 Apr 2020 09:42:53 +0200 Organization: Adalog Message-ID: References: <5e956327$0$1635$e4fe514c@news.kpn.nl> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Date: Tue, 14 Apr 2020 07:42:54 -0000 (UTC) Injection-Info: reader02.eternal-september.org; posting-host="9b9d0c475951a8f6f139341c1bf1b4e3"; logging-data="5386"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+FvuhGRfwdB7fgwLL2e+wX" User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 Cancel-Lock: sha1:EzhS5jTu1sdGix1uOJOPuq5NQhI= In-Reply-To: <5e956327$0$1635$e4fe514c@news.kpn.nl> Content-Language: fr Xref: reader01.eternal-september.org comp.lang.ada:58355 Date: 2020-04-14T09:42:53+02:00 List-Id: Le 14/04/2020 à 09:15, ldries46 a écrit : > I just want to see if the routing of thedifferent Buffer_Pointer's is > correct so I thought Buffer_Pointer'Image(El) would show the value of > The Pointer El f.i. ?x000000 for null or even the simpel decimal value 0. > > This construction creates a failure during compiling. > Should I use another attribute or some other construction? In Ada, a pointer is not an integer and has no 'Image attribute. A pointer is not an address either. Of course, for debugging you can indulge your self to constructs that would be thrown at for long term maintenance. So... 1) Use Unchecked_Conversion to convert it to an appropriate integer type 2) use package Address_To_Access conversion to convert your pointer to an address, then System.Storage_Elements.To_Integer to convert the address to Integer_Address, which is an integer type. -- J-P. Rosen Adalog 2 rue du Docteur Lombard, 92441 Issy-les-Moulineaux CEDEX Tel: +33 1 45 29 21 52, Fax: +33 1 45 29 25 00 http://www.adalog.fr