[comp.lang.ada] Calling an Ada subprogram from a C function

coates@mprgate.mpr.ca (Simon Coates) (04/19/91)

Does anyone out there know of a way to permit a C function to call an Ada
subprogram using the Alsys compiler? The C function would have previously 
been invoked by another Ada subprogram by way of the INTERFACE pragma. (No
doubt this is all hidden in the manuals somewhere, but I've yet to find it)

Many thanks for any assistance.

Simon Coates (coates@mprgate.mpr.ca)

jws@hpcupt3.cup.hp.com (John Stafford) (04/23/91)

As far as I know it isn't hidden away in the manual anywhere.  In
general, I believe, non-Ada calling Ada is not supported by Alsys Ada.
Having said that, I believe, but am not sure, that Alsys may have an
"application note" on how you can achieve non-Ada to Ada calls in
limited contexts.  Additionally, HP/Ada on the 9000/[34]00 series, which
is produced under license from Alsys, does support pragma EXPORT on
subprograms, making them directly (and indirectly) callable from non-Ada
code (IN parameters only, exceptions must not propagate to the non-Ada
caller, and several other restrictions apply).

--
John Stafford -- Hewlett Packard California Language Lab
Internet: jws@cup.hp.com           UUCP: hplabs!hpda!jws