DocAda(tm) is a productivity tool of KSCE

Prev | Up | Next | Back | Forward
About DocAda Light: Preface / Preliminary / Help / TOC / Copyright
DocAda Online at the Ada Home: Complete RM95 / Updates / News

F.2 The Package Decimal

Static Semantics

The library package Decimal has the following declaration:

   
       package Ada.Decimal is
          pragma Pure(Decimal);

          Max_Scale : constant := implementation-defined;
          Min_Scale : constant := implementation-defined;

          Min_Delta : constant := 10.0**(-Max_Scale);
          Max_Delta : constant := 10.0**(-Min_Scale);

          Max_Decimal_Digits : constant := implementation-defined;

          generic
             type Dividend_Type  is delta <> digits <>;
             type Divisor_Type   is delta <> digits <>;
             type Quotient_Type  is delta <> digits <>;
             type Remainder_Type is delta <> digits <>;
          procedure Divide (Dividend  : in Dividend_Type;
                            Divisor   : in Divisor_Type;
                            Quotient  : out Quotient_Type;
                            Remainder : out Remainder_Type);
          pragma Convention(Intrinsic, Divide);

       end Ada.Decimal;

Max_Scale is the largest N such that 10.0**(-N) is allowed as a decimal type's delta. Its type is universal_integer.

Min_Scale is the smallest N such that 10.0**(-N) is allowed as a decimal type's delta. Its type is universal_integer.

Min_Delta is the smallest value allowed for delta in a decimal_fixed_point_definition. Its type is universal_real.

Max_Delta is the largest value allowed for delta in a decimal_fixed_point_definition. Its type is universal_real.

Max_Decimal_Digits is the largest value allowed for digits in a decimal_fixed_point_definition. Its type is universal_integer.

Static Semantics

The effect of Divide is as follows. The value of Quotient is Quotient_Type(Dividend/Divisor). The value of Remainder is Remainder_Type(Intermediate), where Intermediate is the difference between Dividend and the product of Divisor and Quotient; this result is computed exactly.

Implementation Requirements

Decimal.Max_Decimal_Digits shall be at least 18.

Decimal.Max_Scale shall be at least 18.

Decimal.Min_Scale shall be at most 0.

About DocAda Light: Preface / Preliminary / Help / TOC / Copyright
DocAda Online at the Ada Home: Complete RM95 / Updates / News
Prev | Up | Next | Back | Forward


Copyright © 1994-1997 by Kempe Software Capital Enterprises. All Rights Reserved. For comments on this DocAda(tm) hypertext document, please write to KSCE, at docada@ksce.com