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,782d14fd472db944 X-Google-Attributes: gid103376,public From: tmoran@bix.com Subject: Re: Question about interfacing C and Ada95 Date: 1999/11/08 Message-ID: #1/1 X-Deja-AN: 546026658 References: <806ud0$lu1$1@trog.dera.gov.uk> X-Complaints-To: abuse@pacbell.net X-Trace: typhoon-sf.snfc21.pbi.net 942089823 207.214.211.15 (Mon, 08 Nov 1999 11:37:03 PST) Organization: SBC Internet Services NNTP-Posting-Date: Mon, 08 Nov 1999 11:37:03 PST Newsgroups: comp.lang.ada Date: 1999-11-08T00:00:00+00:00 List-Id: >we have recoded the c to this as Ada funcs do not allow more than >one return val; > >void getX ( void **instance, int *float, int *error ); > >How do I then write the Ada to interface to this in Ada 95. procedure getX(M : in out Matrix; Float : in out integer; Error : out integer); or so, depending on just what you want. Actually, both Ada and C allow a single return value from a function, ie "result = getX(....);", but Ada in addition allows "out" or "in out" parameters to procedures, which in C must be simulated by passing "in" a pointer to the target parameter.