Movatterモバイル変換


[0]ホーム

URL:


Jump to content
WikibooksThe Free Textbook Project
Search

Ada Programming/Keywords/delta

From Wikibooks, open books for an open world
<Ada Programming |Keywords
Computing »Computer Science »Computer Programming »Ada Programming

Ada. Time-tested, safe and secure.
Ada. Time-tested, safe and secure.

Description

[edit |edit source]

This keyword is used in the declaration offixed point types. Delta represents the absolute error bound of afixed point type; that is, delta gives a hint to the compiler how to choose the smallest incremental value of the type, called theSmall of the type. This Small value is accessible via the attribute T'Small.

For Ordinary fixed point types, it is by default a power of two not greater than the delta; it is specifyable by an attribute clause to be any value not greater than the delta.

For decimal fixed point types, the Small value is equal to the delta, which of course must be a power of ten.

Example

[edit |edit source]
type Fixed_Pointisdelta 0.01digits 10;-- A decimal fixed point typeMy_Fixed_Point : Fixed_Point := 0.0;...My_Fixed_Point := 0.1;-- OkMy_Fixed_Point := 0.02;-- OkMy_Fixed_Point := 0.001;-- Oops - this value is too small.-- It will be represented by zero.

See also

[edit |edit source]

Wikibook

[edit |edit source]

Ada Reference Manual

[edit |edit source]

Ada Quality and Style Guide

[edit |edit source]


Ada Keywords
abortelsenewreturn
abselsifnotreverse
abstract (Ada 95)endnull
acceptentryselect
accessexceptionofseparate
aliased (Ada 95)exitorsome (Ada 2012)
allotherssubtype
andforoutsynchronized (Ada 2005)
arrayfunctionoverriding (Ada 2005)
attagged (Ada 95)
genericpackagetask
begingotoparallel (Ada 2022)terminate
bodypragmathen
ifprivatetype
caseinprocedure
constantinterface (Ada 2005)protected (Ada 95)until (Ada 95)
isuse
declareraise
delaylimitedrangewhen
deltalooprecordwhile
digitsremwith
domodrenames
requeue (Ada 95)xor
Retrieved from "https://en.wikibooks.org/w/index.php?title=Ada_Programming/Keywords/delta&oldid=3250128"
Category:
Hidden categories:

[8]ページ先頭

©2009-2025 Movatter.jp