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!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.freenet.de!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 16:03:11 +0000 Message-ID: References: <41E7F653.2F899F47@alfred-hilscher.de> Content-Type: text/plain; charset=us-ascii X-Trace: individual.net 9LUgYFcqLOtQo9gklwdpvwVdFcFAgOoLPTaYkKIrLNtnpCbrU= X-Orig-Path: not-for-mail User-Agent: Gemini/1.45d (Qt/3.3.2) (Windows-XP) Xref: g2news1.google.com comp.lang.ada:7815 Date: 2005-01-15T16:03:11+00:00 List-Id: Alfred Hilscher wrote: > I want to interface to a C-function expecting a "far *", what have I to > pass: an "access all ..." or "System.Address"? Are there differences > between access and address, or are their internal representations equal? I > use GNAT 3.15p. Assuming you are passing parameters to a C function, it should be very simple. For example, if there is a C function defined thus: int wibble(int *n); then in Ada you can declare: function Wibble (Number: in out Interfaces.C.int); pragma Import(C,Wibble,"wibble"); and it should work. (Obviously, you must link the C functions in somehow.) If you were to give more information about what you are really trying to achieve, we can probably give you more accurate and detailed answers. -- Nick Roberts