comp.lang.ada
 help / color / mirror / Atom feed
* Help with fixed type decimal numbers
@ 2004-09-13 11:10 matthias_k
  2004-09-13 11:50 ` David C. Hoos, Sr.
  0 siblings, 1 reply; 4+ messages in thread
From: matthias_k @ 2004-09-13 11:10 UTC (permalink / raw)


Hi all,

what exactly does the 'delta' keyword imply when defining a fixed 
decimal type?

thanks in advance,
Matthias



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

* Re: Help with fixed type decimal numbers
  2004-09-13 11:10 Help with fixed type decimal numbers matthias_k
@ 2004-09-13 11:50 ` David C. Hoos, Sr.
  2004-09-13 12:02   ` matthias_k
  2004-09-13 12:23   ` matthias_k
  0 siblings, 2 replies; 4+ messages in thread
From: David C. Hoos, Sr. @ 2004-09-13 11:50 UTC (permalink / raw)
  To: matthias_k; +Cc: comp.lang.ada

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
>
> 





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

* Re: Help with fixed type decimal numbers
  2004-09-13 11:50 ` David C. Hoos, Sr.
@ 2004-09-13 12:02   ` matthias_k
  2004-09-13 12:23   ` matthias_k
  1 sibling, 0 replies; 4+ messages in thread
From: matthias_k @ 2004-09-13 12:02 UTC (permalink / raw)


David C. Hoos, Sr. wrote:
> 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
>>
>>
> 
> 

Can you point me to that Ada Reference Manual you quoted from?

Thank you,
Matthias



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

* Re: Help with fixed type decimal numbers
  2004-09-13 11:50 ` David C. Hoos, Sr.
  2004-09-13 12:02   ` matthias_k
@ 2004-09-13 12:23   ` matthias_k
  1 sibling, 0 replies; 4+ messages in thread
From: matthias_k @ 2004-09-13 12:23 UTC (permalink / raw)


David C. Hoos, Sr. wrote:
> 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
>>
>>
> 
> 

Nevermind, found it myself.



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

end of thread, other threads:[~2004-09-13 12:23 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-09-13 11:10 Help with fixed type decimal numbers matthias_k
2004-09-13 11:50 ` David C. Hoos, Sr.
2004-09-13 12:02   ` matthias_k
2004-09-13 12:23   ` matthias_k

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