From: Sébastien <seb.morand@gmail.com>
Subject: Re: Pointer
Date: Mon, 19 May 2008 12:47:35 +0000
Date: 2008-05-19T12:47:35+00:00 [thread overview]
Message-ID: <483176E7.3050100@gmail.com> (raw)
In-Reply-To:
> with Interfaces.C.Pointers;
> with Interfaces.C.Strings; use Interfaces.C.Strings;
> with Interfaces.C; use Interfaces.C;
>
> type Chars_Ptr_Array is array (size_t range <>) of aliased chars_ptr;
> pragma Convention (C, Chars_Ptr_Array);
> package Pointers_To_String is
> new Interfaces.C.Pointers (size_t, chars_ptr, chars_ptr_array, null);
> use Pointers_To_String;
> ...
> Data : Pointers_To_String.Pointer := MyCFunctionReturninCharStarStar;
> N: Natural := MYCFunctionTellingMeHowManyStrings;
> ...
> for Index in 1..N loop
> declare
> Element : String := Value (Data.all);
> begin
> ... -- Use the element
> end;
> Increment (Data); -- Move to the next one
> end loop;
Ok I didn't know Interfaces.C.Pointer, it's looks like exaclty what I
need and it's a replacement for pointer arithmetic operations.
next prev parent reply other threads:[~2008-05-19 12:47 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-19 9:38 Pointer Sébastien
2008-05-19 9:53 ` Pointer Dmitry A. Kazakov
2008-05-19 9:54 ` Pointer Dmitry A. Kazakov
2008-05-19 10:13 ` Pointer Sébastien
2008-05-19 10:32 ` Pointer Dmitry A. Kazakov
2008-05-19 10:34 ` Pointer Ludovic Brenta
2008-05-19 11:31 ` Pointer Sébastien
2008-05-19 12:09 ` Pointer Ludovic Brenta
2008-05-19 12:09 ` Pointer Dmitry A. Kazakov
2008-05-19 12:47 ` Sébastien [this message]
2008-05-19 16:25 ` Pointer Matthew Heaney
2008-05-19 16:22 ` Pointer Matthew Heaney
2008-05-19 16:17 ` Pointer Matthew Heaney
2008-05-19 17:23 ` Pointer Sébastien
-- strict thread matches above, loose matches on Subject: below --
2005-08-31 17:02 pointer TC
2005-08-31 18:40 ` pointer Martin Krischik
2005-08-31 18:52 ` pointer Jeffrey Carter
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox