From: ica2ph@alpha1.csv.ica.uni-stuttgart.de (Peter Hermann)
Subject: Re: Ada83: Attribute value for a float?
Date: 1997/07/28
Date: 1997-07-28T00:00:00+00:00 [thread overview]
Message-ID: <5ri1vm$18lq@info4.rus.uni-stuttgart.de> (raw)
In-Reply-To: 33DC6CA2.1670@cci.de
Andrew Lynch (lynch@cci.de) wrote:
> some_float := FLOAT'value(some_string);
should not compile under -gnat83 !
or even better, IMHO: could be compiled ;-) with a big warning
for the sake of better working support.
> Ada83 LRM Annex A:
> P'VALUE For a prefix P that denotes a discrete type or subtype...
> Ada95 LRM Annex K:
> S'Value For every scalar subtype S...
> IIRC a float is scalar, but not discrete which I would take to mean
> that Float'Value is not legal Ada83.
you took correctly: this is not legal Ada83.
> A definite answer/reference would be appreciated!
The attributes 'value and 'image are complementary,
(similarly like 'val and 'pos)
both do not work for floating point of fixed point scalars in Ada83.
--
Peter Hermann Tel:+49-711-685-3611 Fax:3758 ph@csv.ica.uni-stuttgart.de
Pfaffenwaldring 27, 70569 Stuttgart Uni Computeranwendungen
Team Ada: "C'mon people let the world begin" (Paul McCartney)
prev parent reply other threads:[~1997-07-28 0:00 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
1997-07-28 0:00 Ada83: Attribute value for a float? Andrew Lynch
1997-07-28 0:00 ` Peter Hermann [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