comp.lang.ada
 help / color / mirror / Atom feed
From: "Keith Allan Shillington" <keith@sd.aonix.com>
Subject: Re: Questions on an 83->95 porting detail
Date: 1997/01/27
Date: 1997-01-27T00:00:00+00:00	[thread overview]
Message-ID: <01bc0c8c$f8f3e720$fc00af88@godiva> (raw)
In-Reply-To: 9701242001.AA16557@most


W. Wesley Groleau (Wes) <wwgrol@PSESERV3.FW.HAC.COM> wrote in article
<9701242001.AA16557@most>...

> 1. Since a NOTE is not a rule, but only a "consequence of [a] rule
> defined elsewhere," what is/are the rule(s) that 12.5.1(28) is a
> consequence of?  12.5.1(17) says I need a member of the "class of
> all types" but 12.5.1(28) says, "No, you need a member of the
> class of all definite types."

That would be 12.5.1(7) and 12.5.1(11) Where the difference between a
formal with and without a discriminant.  Actually the key wording is at
12.5.1(6) "If the formal subtype is definite, then the actual subtype shall
also be definite."  So, 12.5.1(28) is a direct result of 12.5.1(6)

> 2. What is the smallest change...
see below
> 3. What would be the minimum change...
see below 
> 4. Extra credit if the result is still legal, working Ada-83.... :-)

No can do.

> * heap_management.ads contains:
> 
>   generic
>     type Item is limited private;
      type Item is limited private (<>);
>     type Pointer is access Item;
>   package Unconstrained is
>   -- intended to be used for unconstrained types
>   -- an alternate, more efficient, version is offered for constrained
types

Given the comment in the package spec, this software is designed to allow
for the unknown discriminant.  Ada95 requires that you inform the compiler
of this design decision.  Sadly, your Ada83 compiler will not recognize
this new syntax.

-- Keith Shillington keith@sd.aonix.com




      parent reply	other threads:[~1997-01-27  0:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-01-24  0:00 Questions on an 83->95 porting detail W. Wesley Groleau (Wes)
1997-01-25  0:00 ` Robert A Duff
1997-01-27  0:00 ` Keith Allan Shillington [this message]
replies disabled

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