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,faa99703f0fc19f0 X-Google-Attributes: gid103376,public From: dewar@gnat.com Subject: Re: Combining Ada 83 & Ada 95 under NT Date: 1998/09/12 Message-ID: <6tdge2$2a6$1@nnrp1.dejanews.com>#1/1 X-Deja-AN: 390377258 References: <35F927A8.6FA1@mitre.org> <6tcnru$5ce@priv-sys04-le0.telusplanet.net> X-Http-Proxy: 1.0 x8.dejanews.com:80 (Squid/1.1.22) for client 205.232.38.14 Organization: Deja News - The Leader in Internet Discussion X-Article-Creation-Date: Sat Sep 12 09:55:19 1998 GMT Newsgroups: comp.lang.ada X-Http-User-Agent: Mozilla/2.02 (OS/2; I) Date: 1998-09-12T00:00:00+00:00 List-Id: 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