comp.lang.ada
 help / color / mirror / Atom feed
From: "David C. Hoos, Sr." <david.c.hoos.sr@ada95.com>
To: "matthias_k" <nospam@digitalraid.com>
Cc: comp.lang.ada@ada-france.org
Subject: Re: Help with fixed type decimal numbers
Date: Mon, 13 Sep 2004 06:50:28 -0500
Date: 2004-09-13T06:50:28-05:00	[thread overview]
Message-ID: <mailman.22.1095076250.390.comp.lang.ada@ada-france.org> (raw)
In-Reply-To: ci3v7g$bs4$05$1@news.t-online.com

It means exactly what the Ada95 Reference Manual
says it means, viz.:

>From section 3.5.9:

7 In a fixed_point_definition or digits_constraint,
the expressions given after the reserved words 
delta and digits shall be static; their values
shall be positive.
8 The set of values of a fixed point type comprise
the integral multiples of a number called the 
small of the type. For a type defined by an
ordinary_fixed_point_definition (an ordinary fixed
point type), the small may be specified by an
attribute_definition_clause (see 13.3); if so
specified, it shall be no greater than the delta
of the type. If not specified, the small of an
ordinary fixed point type is an implementation-
defined power of two less than or equal to the
delta.

9 For a decimal fixed point type, the small equals
the delta; the delta shall be a power of 10. If a 
real_range_specification is given, both bounds of
the range shall be in the range
-(10**digits-1)*delta .. +(10**digits-1)*delta.

In oiher words, the delta fixes the value of the
least-significant bit of the binary representation,
and thus restricts the set of values for the type
to integer multiples of the delta, up to the
limits established by the digits specification for
the type.

----- Original Message ----- 
From: "matthias_k" <nospam@digitalraid.com>
Newsgroups: comp.lang.ada
To: <comp.lang.ada@ada-france.org>
Sent: September 13, 2004 6:10 AM
Subject: Help with fixed type decimal numbers


> Hi all,
>
> what exactly does the 'delta' keyword imply when defining a fixed decimal type?
>
> thanks in advance,
> Matthias
> _______________________________________________
> comp.lang.ada mailing list
> comp.lang.ada@ada-france.org
> http://www.ada-france.org/mailman/listinfo/comp.lang.ada
>
> 





  reply	other threads:[~2004-09-13 11:50 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-09-13 11:10 Help with fixed type decimal numbers matthias_k
2004-09-13 11:50 ` David C. Hoos, Sr. [this message]
2004-09-13 12:02   ` matthias_k
2004-09-13 12:23   ` matthias_k
replies disabled

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