comp.lang.ada
 help / color / mirror / Atom feed
From: briot.emmanuel@gmail.com
Subject: Re: Put the access value
Date: Wed, 15 Apr 2020 00:20:31 -0700 (PDT)
Date: 2020-04-15T00:20:31-07:00	[thread overview]
Message-ID: <b32fc764-f6dd-4c4d-8cfd-4b9ea968a86b@googlegroups.com> (raw)
In-Reply-To: <5e95a814$0$1701$e4fe514c@news.kpn.nl>


The approach I tend to use is using `System.Address_Image`:


   El  : Buffer_Pointer := LastBuffer; 
   ...

   if El /= null then
      Ada.Text_IO.Put_Line (System.Address_Image (El.all'Address));
   end if;

or if this is for slightly longer term

   function Convert is new Ada.Unchecked_Conversion
     (Buffer_Pointer, System.Address);
   Ada.Text_IO.Put_Line (System.Address_Image (Convert (El));

This is really just for quick debugging, and the code is never (really, I swear) committed... Otherwise, I would go to the trouble of creating an `Image` function and use that

  reply	other threads:[~2020-04-15  7:20 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-14  7:15 Put the access value ldries46
2020-04-14  7:42 ` J-P. Rosen
2020-04-18 15:08   ` Oliver Kellogg
2020-04-20 23:02   ` Robert A Duff
2020-04-21  7:07     ` briot.emmanuel
2020-04-21 22:29       ` Robert A Duff
2020-04-14 11:05 ` Jeffrey R. Carter
2020-04-14 12:09   ` ldries46
2020-04-15  7:20     ` briot.emmanuel [this message]
2020-04-15  8:02       ` AdaMagica
2020-04-15  8:51         ` J-P. Rosen
2020-04-15 16:23           ` AdaMagica
2020-04-17 14:20         ` Björn Lundin
2020-04-21 21:06           ` Randy Brukardt
2020-04-22 12:31             ` Björn Lundin
2020-04-22 17:33               ` AdaMagica
2020-04-23 11:37                 ` Björn Lundin
replies disabled

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