From: Mark Lorenzen <mark.lorenzen@surfpost.dk>
Subject: Re: Easy Question - Printing Out An Address
Date: 09 Mar 2005 22:22:46 +0100
Date: 2005-03-09T22:22:46+01:00 [thread overview]
Message-ID: <m3sm34jyzd.fsf@0x535ddc22.boanxx18.adsl-dhcp.tele.dk> (raw)
In-Reply-To: 1110402549.485397.326230@z14g2000cwz.googlegroups.com
Bryan.Berns@gmail.com writes:
> Thanks. The Address_Image method worked perfectly. Now I'm working
> with trying to do the same with a type of Address_Int. Any input
> appreciated.
What about:
with Ada.Text_IO;
with System.Storage_Elements;
procedure Print_Int_Address is
package SE renames System.Storage_Elements;
My_Var : Positive; -- Or some other type.
Sys_Address : System.Address;
Int_Address : SE.Integer_Address;
begin
Sys_Address := My_Var'Address;
Int_Address := SE.To_Integer (Sys_Address);
Ada.Text_IO.Put_Line ("Address is:" &
SE.Integer_Address'Image (Int_Address));
end Print_Int_Address;
Regards,
- Mark Lorenzen
prev parent reply other threads:[~2005-03-09 21:22 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-03-09 18:03 Easy Question - Printing Out An Address Bryan.Berns
2005-03-09 18:23 ` Pascal Obry
2005-03-09 18:34 ` Dmitry A. Kazakov
2005-03-09 21:09 ` Bryan.Berns
2005-03-09 21:22 ` Mark Lorenzen [this message]
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox