comp.lang.ada
 help / color / mirror / Atom feed
* Ada83: Attribute value for a float?
@ 1997-07-28  0:00 Andrew Lynch
  1997-07-28  0:00 ` Peter Hermann
  0 siblings, 1 reply; 2+ messages in thread
From: Andrew Lynch @ 1997-07-28  0:00 UTC (permalink / 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.




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

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

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1997-07-28  0:00 Ada83: Attribute value for a float? Andrew Lynch
1997-07-28  0:00 ` Peter Hermann

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