comp.lang.ada
 help / color / mirror / Atom feed
From: Andrew Lynch <lynch@cci.de>
Subject: Ada83: Attribute value for a float?
Date: 1997/07/28
Date: 1997-07-28T00:00:00+00:00	[thread overview]
Message-ID: <33DC6CA2.1670@cci.de> (raw)


Hi,

we've just started "recycling" some old Ada83 code, which compiles
fine using GNAT, both with and without the -gnat83 switch.
When I took the code home and tried to compile it on my Linux box
with my universities Ada83 compiler it complained about the following:

    ...
    some_float := FLOAT'value(some_string);
    ...


Looking in the LRMs I found the following:

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.

The code was aparently developed using the Telesoft Ada compiler around
1992/1993 and also compiled on a number of other Ada83 compilers
(so say the guys who've been here longer than I have...)
So is this valid Ada83, or maybe an extension that was supported by
many compiler vendors (and then made it into Ada95)?

A definite answer/reference would be appreciated!

Andrew.




             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 Andrew Lynch [this message]
1997-07-28  0:00 ` Ada83: Attribute value for a float? Peter Hermann
replies disabled

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