comp.lang.ada
 help / color / mirror / Atom feed
* Combining Ada 83 & Ada 95 under NT
@ 1998-09-11  0:00 Terry Devine
  1998-09-11  0:00 ` Chris Warwick
  0 siblings, 1 reply; 3+ messages in thread
From: Terry Devine @ 1998-09-11  0:00 UTC (permalink / raw)


Does anyone have any experience (preferably favorable) combining Ada 83
code and Ada 95 code (host and target both x86 Windows NT)?  We're in
the process of integrating 2 systems and would like to be able to
integrate first, and upgrade to Ada 95 later.




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

* Re: Combining Ada 83 & Ada 95 under NT
  1998-09-11  0:00 Combining Ada 83 & Ada 95 under NT Terry Devine
@ 1998-09-11  0:00 ` Chris Warwick
  1998-09-12  0:00   ` dewar
  0 siblings, 1 reply; 3+ messages in thread
From: Chris Warwick @ 1998-09-11  0:00 UTC (permalink / raw)


In article <35F927A8.6FA1@mitre.org>, tdevine@mitre.org wrote:
>Does anyone have any experience (preferably favorable) combining Ada 83
>code and Ada 95 code (host and target both x86 Windows NT)?  We're in
>the process of integrating 2 systems and would like to be able to
>integrate first, and upgrade to Ada 95 later.

I did get some under Sun to sort of work. I had to make the Ada83 stuff the 
master, and then call some 'c' code to act as the actual interface to start 
and control the Ada95 stuff (95 is much better about being called by another 
language)... I got as far as finding that the two runtimes were having a bun 
fight over control of the process, and then gave up because I was looking for 
a quick fix...




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

* Re: Combining Ada 83 & Ada 95 under NT
  1998-09-11  0:00 ` Chris Warwick
@ 1998-09-12  0:00   ` dewar
  0 siblings, 0 replies; 3+ messages in thread
From: dewar @ 1998-09-12  0:00 UTC (permalink / raw)


In article <6tcnru$5ce@priv-sys04-le0.telusplanet.net>,
  warwicks@telusplanet.net (Chris Warwick) wrote:
> In article <35F927A8.6FA1@mitre.org>, tdevine@mitre.org wrote:
> >Does anyone have any experience (preferably favorable) combining Ada 83
> >code and Ada 95 code (host and target both x86 Windows NT)?  We're in
> >the process of integrating 2 systems and would like to be able to
> >integrate first, and upgrade to Ada 95 later.
>
> I did get some under Sun to sort of work. I had to make the Ada83 stuff the
> master, and then call some 'c' code to act as the actual interface to start
> and control the Ada95 stuff (95 is much better about being called by another
> language)... I got as far as finding that the two runtimes were having a bun
> fight over control of the process, and then gave up because I was looking for
> a quick fix...
>

There are two questions here, if you are indeed just talking
about mixing code, this is trivial, people do it every day.
Since Ada 95 is very nearly completely upwards compatible
with Ada 83, this mixing involves no special considerations.
If you are using a compiler like GNAT, you can even use the
-gnat83 switch to get even closer compatibility (e.g. you can
use the identifier protected in one package body, in a program
where other packages have Ada 95 protected types).

But if you are talking about mixing object code from different
compilers, then
mixing Ada 83 and Ada 95 is going to raise many implementation
dependent issues. The calling sequences must be identical, the
data layout must be identical, the runtime environment must be
identical, the handling of elaboration must be indentical. If
any of these are not identical, you can be in trouble.

Obviously it depends what you do. It is much easier to do
arithmetic on integers across the boundary than to start
tasks etc, it is VERY unlikely for instance that you would
ever be able to rendezvous with an Ada 83 task from Ada 95
code.

Probably the only way mixing compilers would work is if the
two compilers have been designed to work with one another
(or at least one has been designed to work with the other).

For example, GNAT on VMS has been designed to be highly
compatible with DEC Ada, and within limits, GNAT code can
be mixed with existing DEC Ada code.

Robert Dewar
Ada Core Technologies

-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp   Create Your Own Free Member Forum




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

end of thread, other threads:[~1998-09-12  0:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-09-11  0:00 Combining Ada 83 & Ada 95 under NT Terry Devine
1998-09-11  0:00 ` Chris Warwick
1998-09-12  0:00   ` dewar

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