CVS difference for ais/ai-00060.txt
--- ais/ai-00060.txt 1998/09/30 00:17:12 1.1
+++ ais/ai-00060.txt 1999/07/21 03:10:57 1.2
@@ -1,4 +1,4 @@
-!standard A.5.4 (00) 97-05-27 AI95-00060/04
+!standard A.5.4 (00) 99-05-27 AI95-00060/05
!class confirmation 95-07-06
!status WG9 approved (8-0-0) 97-07-04
!status ARG approved (6-0-1) 97-04-11
@@ -8,11 +8,11 @@
!subject No predefined 'Truncate Attribute on Fixed-Point Types
The Truncation attribute is not defined for fixed-point types.
In section A.5.3 a number of attributes of floating-point types are
defined which could also usefully be applied to fixed-point types.
@@ -60,13 +60,18 @@
anomalous situation and avoiding unnecessary complication when performing
common and straightforward operations on real values.
The suggested attribute does not seem useful enough to consider
changing the language.
+A B-Test could be written to check that the attributes of A.5.3 are not
+defined for fixed point types, but this would have little value.
!subject Attributes of Fixed-Point Types
@@ -144,10 +149,10 @@
> defined which could also usefully be applied to fixed-point types.
> This comment was prompted by the lack of the trucation attribute
> for fixed-point types. Consider the following:
> type Time_Of_Day is mod 86400;
> T : Time_Of_Day := Time_Of_Day (Ada.Calendar.Seconds(Ada.Calendar.Clock));
> Under the rules given in RM9X for modular types (RM9X-4.6(29)) this would
> be legal; the result of Ada.Calendar.Seconds(Ada.Calendar.Clock) is of
> type Day_Duration which is then rounded to give a result in the range
@@ -169,7 +174,7 @@
> this to work. Unfortunately the 'Truncation attribute cannot be used
> since it applies only to floating point values and not to fixed point
> Possible solutions:
> 1) Convert to Integer and apply "mod": will not always work as the range
> of values for Integer is not guaranteed to be sufficient (RM95-3.5.4(21)).
@@ -197,7 +202,7 @@
> unnecessary for floating point types, and the extension of attributes
> to Truncation would have no impact on existing code since it would simply
> be an extension to the current rules.
> This extension would have a positive benefit with regard to simplifying an
> anomalous situation and avoiding unnecessary complication when performing
> common and straightforward operations on real values.
Questions? Ask the ACAA Technical Agent