From: Elad Rosenheim <e_ros@netvision.net.il>
Subject: Get a pointer to an array
Date: 1999/06/05
Date: 1999-06-05T00:00:00+00:00 [thread overview]
Message-ID: <37599022.C77585D@barak-online.net> (raw)
This question may seem easy, but I haven't been able to find
a solution:
How do I create a normal array, then point an access type to it?
I tried to convert the array 'address attribute to the array access
type,
but it didn't work. I think ADA arrays have some "meta data" before
the data that contains the array bounds, and the 'address attribute
gives the address of the data storage itself. So how can I make the
access
variable point to the array?
This doesn't work:
type int_array is array(integer <>) of integer;
type int_access is access int_array;
function To_Int_Access is new Unchecked_Conversion(
system.address, int_access);
...
declare
a : int_array(1..10);
b : int_access;
begin
a := To_Int_Access(a'address);
...
Please help me with this one.
Thanks,
Elad Rosenheim.
next reply other threads:[~1999-06-05 0:00 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-06-05 0:00 Elad Rosenheim [this message]
1999-06-06 0:00 ` Get a pointer to an array David Botton
1999-06-06 0:00 ` Robert Dewar
1999-06-09 0:00 ` Steve Doiel
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox