comp.lang.ada
 help / color / mirror / Atom feed
From: bobduff@world.std.com (Robert A Duff)
Subject: Re: the 'small attribute and Ada95
Date: 1996/11/12
Date: 1996-11-12T00:00:00+00:00	[thread overview]
Message-ID: <E0rqo2.4E1@world.std.com> (raw)
In-Reply-To: 32889629.1C01@emw.ericsson.se


In article <32889629.1C01@emw.ericsson.se>,
Magnus Ericsson  <Magnus.Ericson@emw.ericsson.se> wrote:
>When I compile this with the Ada 95 compiler (ObjectAda) I get a 
>message indicating that 'Small only is allowed for Fixed point types
>(not for floating point that is used in the original Ada 83 code).

Several floating point attributes were removed from the language.  The
intent was that implementations would support them anyway, as
implementation-defined attributes, for upward compatibility.  We just
didn't want to go to the trouble of defining what they mean in the RM.
Unfortunately, there was a glitch -- an implementation is allowed to
define new attributes, but is not allowed to extend existing attributes.
Since Small is defined for fixed point types, it would normally be
illegal for an implementation to allow float'Small.  However, AI-93
explicitly gives permission to support Small on floating point types.
AI-93 has been approved by the appropriate ISO committees (ARG and WG9).

You could ask your vendor to implement all the old attributes, and point
out AI-93 to them.  Or you could use the corresponding Ada 95 attribute.
I think it's Model_Small, but I'm not sure, because I'm not a numerics
expert either.  As far as I know, there's no simple way to write code
that works for both Ada 83 and Ada 95, unless Ada 95 implementers allow
the old attributes.

See AARM-J(1), A.5.3(67,67.a).

- Bob




  reply	other threads:[~1996-11-12  0:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-11-12  0:00 the 'small attribute and Ada95 Magnus Ericsson
1996-11-12  0:00 ` Robert A Duff [this message]
1996-11-12  0:00   ` Robert Dewar
replies disabled

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