comp.lang.ada
 help / color / mirror / Atom feed
* VMS Ada from C questions
@ 1993-06-02 22:49 Scott Moody
  0 siblings, 0 replies; 2+ messages in thread
From: Scott Moody @ 1993-06-02 22:49 UTC (permalink / raw)


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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: VMS Ada from C questions
@ 1993-06-03 13:31 Bevin R. Brett
  0 siblings, 0 replies; 2+ messages in thread
From: Bevin R. Brett @ 1993-06-03 13:31 UTC (permalink / raw)


In article <C80nEy.AvJ@shuksan.ds.boeing.com>, 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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~1993-06-03 13:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1993-06-03 13:31 VMS Ada from C questions Bevin R. Brett
  -- strict thread matches above, loose matches on Subject: below --
1993-06-02 22:49 Scott Moody

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox