* Interfaces.C.Pointers
@ 2003-06-22 3:28 tmoran
0 siblings, 0 replies; only message in thread
From: tmoran @ 2003-06-22 3:28 UTC (permalink / raw)
I seems to me that Interfaces.C.Pointers really isn't just about C
pointers (though that may be its main use), but the Value functions
let you convert a pointer to an element to a pointer to an array
of variable size.
type general_array_type is array(integer range <>) of integer;
procedure p(pi : access integer; length : natural) is
type static is array(1 .. 3) of integer;
x : static;
p(x(x'first),3);
Inside procedure p, by using Interfaces.C.Pointers, you can
my_copy : general_array_type := value(pi, ptrdiff_t(length));
Am I misunderstanding?
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2003-06-22 3:28 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-06-22 3:28 Interfaces.C.Pointers tmoran
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox