comp.lang.ada
 help / color / mirror / Atom feed
* Re: Backward compatibility between Ada 95 and Ada 83
       [not found] <01bccd8e$68785d20$b229accf@default>
                   ` (2 preceding siblings ...)
  1997-09-30  0:00 ` W. Wesley Groleau x4923
@ 1997-09-30  0:00 ` John Herro
  3 siblings, 0 replies; 6+ messages in thread
From: John Herro @ 1997-09-30  0:00 UTC (permalink / raw)



"James H. Robinson, III" <jr3uva90@erols.com> writes:
> I'm using an Ada 95 compiler, but my
> class is teaching Ada 83.  How backwardly
> compatible is Ada 95 with is Ada 83?

Very.  You have almost nothing to worry about.  With very few exceptions,
Ada 95 is a superset of Ada 83, and anything you write in Ada 83 will
compile in Ada 95.

Of course, you must avoid using the six new reserved words as identifiers:
abstract, aliased, protected, requeue, tagged, and until.  One other thing
*might* bite you:  Let's say you write an Ada 83 package spec that requires
no body (because it contains only type definitions and object declarations,
but no procedure and function specs).  Now let's say you want to write a
body anyway, perhaps to initialize an array.  This will compile in Ada 83,
but in Ada 95 it won't compile until you add pragma Elaborate_Body.  Remove
that pragma when you turn in your Ada 83 assignment.  If you don't
understand that because you haven't covered packages yet, don't worry about it!

Good luck in your class!  I know you'll really like Ada!

- John Herro
Software Innovations Technology
http://members.aol.com/AdaTutor
ftp://members.aol.com/AdaTutor






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

* Re: Backward compatibility between Ada 95 and Ada 83
       [not found] <01bccd8e$68785d20$b229accf@default>
@ 1997-09-30  0:00 ` Dale Stanbrough
  1997-09-30  0:00 ` Samuel Tardieu
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 6+ messages in thread
From: Dale Stanbrough @ 1997-09-30  0:00 UTC (permalink / raw)



James H. Robinson writes:

"I'm using an Ada 95 compiler, but my class is teaching Ada 83.  How
 backwardly compatible is Ada 95 with Ada 83?"


Good enough that it won't matter.
The only things you are likely to encounter are
	new reserved words (6 of them)
	Character now has 256, not 128 values
	Numeric_Error is subsumed by Constraint_Error
	String literals can sometimes be interpreted as Wide_Strings

Unless you are learning this for an existing, non migrating project,
give your educators a big kick, and tell them to teach Ada95.

There is so much more that is better in Ada95.

Dale




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

* Re: Backward compatibility between Ada 95 and Ada 83
       [not found] <01bccd8e$68785d20$b229accf@default>
  1997-09-30  0:00 ` Backward compatibility between Ada 95 and Ada 83 Dale Stanbrough
@ 1997-09-30  0:00 ` Samuel Tardieu
  1997-09-30  0:00 ` W. Wesley Groleau x4923
  1997-09-30  0:00 ` John Herro
  3 siblings, 0 replies; 6+ messages in thread
From: Samuel Tardieu @ 1997-09-30  0:00 UTC (permalink / raw)
  To: James H. Robinson, III


>>>>> "James" == James H Robinson, <jr3uva90@erols.com> writes:

James> I'm using an Ada 95 compiler, but my class is teaching Ada 83.
James> How backwardly compatible is Ada 95 with Ada 83?

Except for generics (you must use a box (<>) in Ada 95 to allow
instantiating with unconstrained types), there is little chance that
you encounter an incompatibilites.

These incompatibilities are listed at several places. A good starting
point is http://www.adahome.com/.

Moreover, if you are using GNAT, there is a -gnat83 switch which will
put the compiler in a mode that will accept the Ada 83 constructs.

  Sam
-- 
Samuel Tardieu -- sam@ada.eu.org




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

* Re: Backward compatibility between Ada 95 and Ada 83
       [not found] <01bccd8e$68785d20$b229accf@default>
  1997-09-30  0:00 ` Backward compatibility between Ada 95 and Ada 83 Dale Stanbrough
  1997-09-30  0:00 ` Samuel Tardieu
@ 1997-09-30  0:00 ` W. Wesley Groleau x4923
  1997-09-30  0:00 ` John Herro
  3 siblings, 0 replies; 6+ messages in thread
From: W. Wesley Groleau x4923 @ 1997-09-30  0:00 UTC (permalink / raw)



James H. Robinson, III wrote:
> I'm using an Ada 95 compiler, but my class is teaching Ada 83.  How
> backwardly compatible is Ada 95 with Ada 83?

Interesting that the three responses so far have very little overlap.
There is a "Compatibility Guide" by Taylor somewhere in the depths
of the AdaIC which lists MANY incompatibilities.  However, most of
them are of little _practical_ consequence.

In one porting effort, I saw all that were mentioned by Stanbrough,
Tardieu, and Herro, plus two more:

1. Character literals can be ambiguous with Wide_Character literals.

2. change in "freezing" rules.
   (Long ago on a particular project, it was thought that not
   putting representation specifications in the private part
   violated information hiding.  This resulted in a lot of
   tedious error-prone rearranging when porting to Ada 95.)

-- 
----------------------------------------------------------------------
    Wes Groleau, Hughes Defense Communications, Fort Wayne, IN USA
Senior Software Engineer - AFATDS                  Tool-smith Wanna-be

Don't send advertisements to this domain unless asked!  All disk space
on fw.hac.com hosts belongs to either Hughes Defense Communications or 
the United States government.  Using email to store YOUR advertising 
on them is trespassing!
----------------------------------------------------------------------




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

* Re: Backward compatibility between Ada 95 and Ada 83
@ 1997-10-01  0:00 Marin David Condic, 561.796.8997, M/S 731-96
  0 siblings, 0 replies; 6+ messages in thread
From: Marin David Condic, 561.796.8997, M/S 731-96 @ 1997-10-01  0:00 UTC (permalink / raw)



Dale Stanbrough <dale@GOANNA.CS.RMIT.EDU.AU> writes:
>Good enough that it won't matter.
>The only things you are likely to encounter are
>        new reserved words (6 of them)
>        Character now has 256, not 128 values
>        Numeric_Error is subsumed by Constraint_Error
>        String literals can sometimes be interpreted as Wide_Strings
>
    Except for the reserved words (having to know a few more of them
    to avoid using them as identifiers) I would think the rest is
    basically invisible to someone developing code for student
    projects. If you write string code assuming Ada83 rules, it will
    behave accordingly. It's maybe more of an issue that some things
    which might have been considered a "mistake" in Ada83 are O.K. in
    Ada95

>Unless you are learning this for an existing, non migrating project,
>give your educators a big kick, and tell them to teach Ada95.
>
    Good advice. Ada95, having the GNAT compiler available, ought to
    be standard-issue for college courses in Ada. And given the new
    features, it ought to extend nicely from an "intro" level course
    on to advanced courses in operating systems, realtime systems,
    compiler theory, etc.

>There is so much more that is better in Ada95.
>
>Dale
>
    Yeah, verrily.

    MDC

Marin David Condic, Senior Computer Engineer     ATT:        561.796.8997
Pratt & Whitney GESP, M/S 731-96, P.O.B. 109600  Fax:        561.796.4669
West Palm Beach, FL, 33410-9600                  Internet:   CONDICMA@PWFL.COM
===============================================================================
"I saw a bank that said "24 Hour Banking", but I don't have that much time."
        --  Steven Wright
===============================================================================




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

* Re: Backward compatibility between Ada 95 and Ada 83
@ 1997-10-01  0:00 Marin David Condic, 561.796.8997, M/S 731-96
  0 siblings, 0 replies; 6+ messages in thread
From: Marin David Condic, 561.796.8997, M/S 731-96 @ 1997-10-01  0:00 UTC (permalink / raw)



 "James H. Robinson, III" <jr3uva90@EROLS.COM> writes:
>
>I'm using an Ada 95 compiler, but my class is teaching Ada 83.  How
>backwardly compatible is Ada 95 with Ada 83?
>
    I have ported a fairly significant body of Ada83 code across to a
    different target using Ada95. I have yet to encounter an issue
    where an incompatibility was due to differences between the two
    languages.

    Here's the scoop: I've got code that is compiled on a VAX,
    targeted to an MC68040(1) using an XD-Ada 83 compiler. It's
    getting moved to a Sun workstation and compiled (with some other
    code) using the GNAT Ada95 compiler. In tribute to Ada (and the
    luck of having similar hardware architectures!) I have had zero
    problems with any language features being incompatible, miniscule
    problems relating to representation clauses, a few problems
    relating to sizes of predefined entities (Developer's advice:
    *never* use the standard Integer, Float, etc. if you think you'll
    ever have to port or change the arithmetic behavior) and the bulk
    of my problems related to the architecture of the software itself.

    Explanation: I'm grabbing a chunk of an embedded control and
    building an environment for it to run on a Sun. My problem has
    been the design of the software involves many layers of "with"
    context clauses. Package A withs B, package B withs C, etc., etc.
    So if I just want one banana, I've got to take the whole gorilla.

    But I am *very* pleased with the fact that upward compatibility
    and porting to a different machine was this easy. Almost totally
    painless.

    MDC

    (1) BTW: Has anyone out there seen a decent MC680x0 software
    emulation to run on a VAX, Sun or PC? I need to propose a
    development/testing environment and I'm shopping around for
    software simulations. If you have one or know of one, please
    e-mail me directly. Thanks.


Marin David Condic, Senior Computer Engineer     ATT:        561.796.8997
Pratt & Whitney GESP, M/S 731-96, P.O.B. 109600  Fax:        561.796.4669
West Palm Beach, FL, 33410-9600                  Internet:   CONDICMA@PWFL.COM
===============================================================================
"I saw a bank that said "24 Hour Banking", but I don't have that much time."
        --  Steven Wright
===============================================================================




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

end of thread, other threads:[~1997-10-01  0:00 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <01bccd8e$68785d20$b229accf@default>
1997-09-30  0:00 ` Backward compatibility between Ada 95 and Ada 83 Dale Stanbrough
1997-09-30  0:00 ` Samuel Tardieu
1997-09-30  0:00 ` W. Wesley Groleau x4923
1997-09-30  0:00 ` John Herro
1997-10-01  0:00 Marin David Condic, 561.796.8997, M/S 731-96
  -- strict thread matches above, loose matches on Subject: below --
1997-10-01  0:00 Marin David Condic, 561.796.8997, M/S 731-96

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