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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,8ebde0e81efb7e79 X-Google-Attributes: gid103376,public From: dennison@telepath.com Subject: Re: Importing a Unix function call Date: 1998/12/04 Message-ID: <749q8c$2kn$1@nnrp1.dejanews.com>#1/1 X-Deja-AN: 418765672 References: <36683FA3.2512DECF@ndirect.co.uk> X-Http-Proxy: 1.0 x1.dejanews.com:80 (Squid/1.1.22) for client 204.48.27.130 Organization: Deja News - The Leader in Internet Discussion X-Article-Creation-Date: Fri Dec 04 23:12:15 1998 GMT Newsgroups: comp.lang.ada X-Http-User-Agent: Mozilla/4.5 [en] (WinNT; I) Date: 1998-12-04T00:00:00+00:00 List-Id: In article <36683FA3.2512DECF@ndirect.co.uk>, Steve Crowe wrote: > Someone has bound to have done this before... hopefully. > > Using Ada to import a function is easy, but if the function parameter > returns > a value, how is the Ada error overcome. As I want the return value as > well > as the out parameter. Is there away round this using a pragma? > > GNAT AdA compiler running under Unix, the function being imported is a > Unix 'pipe'. If you are using gnat, you can use pragma Import_Valued_Procedure. The portable way around this problem is to pass the parameters the same way C does: all "in"s, with some being pointer objects. C doesn't have "out" parameters either, you know. -- T.E.D. -----------== Posted via Deja News, The Discussion Network ==---------- http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own