From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.5-pre1 (2020-06-20) on ip-172-31-74-118.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-1.9 required=3.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.5-pre1 Date: 3 Jun 93 13:31:21 GMT From: pa.dec.com!e2big.mko.dec.com!dbased.nuo.dec.com!digits.enet.dec.com!brett @decwrl.dec.com (Bevin R. Brett) Subject: Re: VMS Ada from C questions Message-ID: <1993Jun3.123650.8927@dbased.nuo.dec.com> List-Id: In article , scott@shuksan.ds.boeing.com (Sco tt Moody) writes... >Does anyone have experience calling VMS Ada from C? > >I can't seem to the the argument sizes correct, or >the argument passing mechanism. > >There is a pragma export_procedure, but nothing to >tell the passing mechanism. > >Now I can call C from Ada, and tell it to pass by value, >but there isn't a export version. > >Anyone use VMS Ada as a non-main program?? > >Thanks.. > >-- >Scott Moody (206) 773-4313 "There are no answers .. just cross references" > scott@shuksan.boeing.com > uunet!bcstec!shuksan!scott -- The V3.0 version of DEC Ada for OpenVMS VAX Systems, and for OpenVMS AXP system s both support specifying mechanism and result_mechanism in the Export_[proc|func ] pragmas with the same syntax as the Import_[proc|func] pragmas. You should have this version installed by now, it has been out for quite a while. [The VAX version is also the one that supports Smart Recompilation, if you get the Professional Development Option]. Prior to that, the only way was (a) have the C code pass a pointer, to get Reference semantics, or (b) gross hacks involving taking the address of a in parameter of a large record type and unchecked_converting it to Integer [or whatever]. -- To see how to use Ada units as a non-main program, look up ACS EXPORT in the Developing Ada Programs manual. -- /Bevin DEC Ada team