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=-1.9 required=5.0 tests=BAYES_00 autolearn=ham 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!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Nick Roberts Newsgroups: comp.lang.ada Subject: Re: Ada equivalent for C-pointer? Date: Sat, 15 Jan 2005 18:46:27 +0000 Message-ID: References: <41E7F653.2F899F47@alfred-hilscher.de> Content-Type: text/plain; charset=us-ascii X-Trace: individual.net SVYdKUZHisWCPk1fXbSxWgD7S5nrgUvCjZOtjSabBV3F3nsU8= X-Orig-Path: not-for-mail User-Agent: Gemini/1.45d (Qt/3.3.2) (Windows-XP) Xref: g2news1.google.com comp.lang.ada:7826 Date: 2005-01-15T18:46:27+00:00 List-Id: Simon Wright wrote: > Nick Roberts writes: > > > I think the 'in out' mode would work with GNAT/GCC, but I'd suggest > > testing it to make sure. I suppose using the 'access' mode might be > > clearer, and it might be slightly more efficient. > > with Interfaces.C; function Wibble (Number: in out Interfaces.C.int) > return Interfaces.C.int; pragma Import(C,Wibble,"wibble"); > > smaug.pushface.org[4]$ gnatgcc wibble.ads wibble.ads:2:18: functions can > only have "in" parameters Of course, that was stupid of me. It must either be a procedure or use an access parameter. Sorry. -- Nick Roberts