From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,ac6f6c30c45f808a X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news1.google.com!newsread.com!news-xfer.newsread.com!newspeer.monmouth.com!news-FFM2.ecrc.net!newsfeed00.sul.t-online.de!newsmm00.sul.t-online.de!t-online.de!news.t-online.com!not-for-mail From: Martin Krischik Newsgroups: comp.lang.ada Subject: Re: Ada equivalent for C-pointer? Date: Sun, 16 Jan 2005 12:07:34 +0100 Organization: None Message-ID: <20110007.xI7UqhJAcO@linux1.krischik.com> References: <41E7F653.2F899F47@alfred-hilscher.de> <1621573.egxgrGf4Ni@linux1.krischik.com> Reply-To: martin@krischik.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit X-Trace: news.t-online.com 1105878033 00 7297 ZbprrLllgLztjqv 050116 12:20:33 X-Complaints-To: usenet-abuse@t-online.de X-ID: ZqrWDvZLQeQR7K6O66VY9lWGhVoaJEk05j6idZYkTa29OlfbDdgLgv User-Agent: KNode/0.8.0 Xref: g2news1.google.com comp.lang.ada:7846 Date: 2005-01-16T12:07:34+01:00 List-Id: Pascal Obry wrote: > > Martin Krischik writes: > >> >> So, you probably want: >> >> >> >> function Wibble (Number: access Interfaces.C.int) >> >> return Interfaces.C.int; >> >> >> >> pragma Import(C,Wibble,"wibble"); >> > >> > I think the 'in out' mode would work with GNAT/GCC, but I'd suggest >> > testing it to make sure. >> >> I did the testing - it does work > > How a function with an "in out" parameter can possibly work :) ? Ok, you got me there. Of corse it will work only with a procedure. But: A ex/import C function will use a pointer for record types on "in" as well. Martin -- mailto://krischik@users.sourceforge.net http://www.ada.krischik.com