Go to the first, previous, next, last section, table of contents.
-
This annex summarizes the definitions given elsewhere of the
language-defined attributes.
-
P'Access
For a prefix P that denotes a subprogram:
-
P'Access yields an access value that designates the subprogram denoted
by P. The type of P'Access is an access-to-subprogram type (S), as
determined by the expected type. See section 3.10.2 Operations of Access Types.
-
X'Access
For a prefix X that denotes an aliased view of an object:
-
X'Access yields an access value that designates the object denoted by X.
The type of X'Access is an access-to-object type, as determined by the
expected type. The expected type shall be a general access type.
See section 3.10.2 Operations of Access Types.
-
X'Address
For a prefix X that denotes an object, program unit, or
label:
-
Denotes the address of the first of the storage elements allocated to X.
For a program unit or label, this value refers to the machine code
associated with the corresponding body or statement. The value of this
attribute is of type System.Address. See section 13.3 Representation Attributes.
-
S'Adjacent
For every subtype S of a floating point type T:
-
S'Adjacent denotes a function with the following specification:
-
function S'Adjacent (X, Towards : T) return T
-
If Towards=X, the function yields X; otherwise, it yields the machine
number of the type T adjacent to X in the direction of Towards, if that
machine number exists. If the result would be outside the base range of
S, Constraint_Error is raised. When T'Signed_Zeros is True, a zero
result has the sign of X. When Towards is zero, its sign has no bearing
on the result. See section A.5.3 Attributes of Floating Point Types.
-
S'Aft
For every fixed point subtype S:
-
S'Aft yields the number of decimal digits needed after the decimal point
to accommodate the delta of the subtype S, unless the delta of the
subtype S is greater than 0.1, in which case the attribute yields the
value one. (S'Aft is the smallest positive integer N for which
(10**N)*S'Delta is greater than or equal to one.) The value of this
attribute is of the type universal_integer. See section 3.5.10 Operations of Fixed Point Types.
-
X'Alignment
For a prefix X that denotes a subtype or object:
-
The Address of an object that is allocated under control of the
implementation is an integral multiple of the Alignment of the object
(that is, the Address modulo the Alignment is zero). The offset of a
record component is a multiple of the Alignment of the component. For an
object that is not allocated under control of the implementation (that
is, one that is imported, that is allocated by a user-defined allocator,
whose Address has been specified, or is designated by an access value
returned by an instance of Unchecked_Conversion), the implementation may
assume that the Address is an integral multiple of its Alignment. The
implementation shall not assume a stricter alignment.
-
The value of this attribute is of type universal_integer, and
nonnegative; zero means that the object is not necessarily aligned on a
storage element boundary. See section 13.3 Representation Attributes.
-
S'Base
For every scalar subtype S:
-
S'Base denotes an unconstrained subtype of the type of S. This
unconstrained subtype is called the base subtype of the type.
See section 3.5 Scalar Types.
-
S'Bit_Order
For every specific record subtype S:
-
Denotes the bit ordering for the type of S. The value of this attribute
is of type System.Bit_Order. See section 13.5.3 Bit Ordering.
-
P'Body_Version
For a prefix P that statically denotes a program unit:
-
Yields a value of the predefined type String that identifies the version
of the compilation unit that contains the body (but not any subunits) of
the program unit. See section E.3 Consistency of a Distributed System.
-
T'Callable
For a prefix T that is of a task type (after any implicit dereference):
-
Yields the value True when the task denoted by T is callable, and False
otherwise; See section 9.9 Task and Entry Attributes.
-
E'Caller
For a prefix E that denotes an entry_declaration:
-
Yields a value of the type Task_ID that identifies the task whose call
is now being serviced. Use of this attribute is allowed only inside an
entry_body or accept_statement corresponding to the entry_declaration
denoted by E. See section C.7.1 The Package Task_Identification.
-
S'Ceiling
For every subtype S of a floating point type T:
-
S'Ceiling denotes a function with the following specification:
-
function S'Ceiling (X : T) return T
-
The function yields the value Ceiling(X), i.e., the smallest (most
negative) integral value greater than or equal to X. When X is zero, the
result has the sign of X; a zero result otherwise has a negative sign
when S'Signed_Zeros is True. See section A.5.3 Attributes of Floating Point Types.
-
S'Class
For every subtype S of a tagged type T (specific or class-wide):
-
S'Class denotes a subtype of the class-wide type (called T'Class in this
International Standard) for the class rooted at T (or if S already
denotes a class-wide subtype, then S'Class is the same as S).
-
S'Class is unconstrained. However, if S is constrained, then the values
of S'Class are only those that when converted to the type T belong to S.
See section 3.9 Tagged Types and Type Extensions.
-
S'Class
For every subtype S of an untagged private type whose full view is
tagged:
-
Denotes the class-wide subtype corresponding to the full view of S. This
attribute is allowed only from the beginning of the private part in
which the full view is declared, until the declaration of the full view.
After the full view, the Class attribute of the full view can be used.
See section 7.3.1 Private Operations.
-
X'Component_Size
For a prefix X that denotes an array subtype or array object (after any
implicit dereference):
-
Denotes the size in bits of components of the type of X. The value of
this attribute is of type universal_integer. See section 13.3 Representation Attributes.
-
S'Compose
For every subtype S of a floating point type T:
-
S'Compose denotes a function with the following specification:
-
function S'Compose
(Fraction : T;
Exponent : universal_integer) return T
-
Let v be the value (Fraction*T'Machine_Radix) ** (Exponent-k), where k
is the normalized exponent of Fraction. If v is a machine number of the
type T, or if |v|>=T'Model_Small, the function yields v; otherwise, it
yields either one of the machine numbers of the type T adjacent to v.
Constraint_Error is optionally raised if v is outside the base range of
S. A zero result has the sign of Fraction when S'Signed_Zeros is True.
See section A.5.3 Attributes of Floating Point Types.
-
A'Constrained
For a prefix A that is of a discriminated type (after any implicit
dereference):
-
Yields the value True if A denotes a constant, a value, or a constrained
variable, and False otherwise. See section 3.7.2 Operations of Discriminated Types.
-
S'Copy_Sign
For every subtype S of a floating point type T:
-
S'Copy_Sign denotes a function with the following specification:
-
function S'Copy_Sign (Value, Sign : T) return T
-
If the value of Value is nonzero, the function yields a result whose
magnitude is that of Value and whose sign is that of Sign; otherwise, it
yields the value zero. Constraint_Error is optionally raised if the
result is outside the base range of S. A zero result has the sign of
Sign when S'Signed_Zeros is True. See section A.5.3 Attributes of Floating Point Types.
-
E'Count
For a prefix E that denotes an entry of a task or protected unit:
-
Yields the number of calls presently queued on the entry E of the
current instance of the unit. The value of this attribute is of the type
universal_integer. See section 9.9 Task and Entry Attributes.
-
S'Definite
For a prefix S that denotes a formal indefinite subtype:
-
S'Definite yields True if the actual subtype corresponding to S is
definite; otherwise it yields False. The value of this attribute is of
the predefined type Boolean. See section 12.5.1 Formal Private and Derived Types.
-
S'Delta
For every fixed point subtype S:
-
S'Delta denotes the delta of the fixed point subtype S. The value of
this attribute is of the type universal_real. See section 3.5.10 Operations of Fixed Point Types.
-
S'Denorm
For every subtype S of a floating point type T:
-
Yields the value True if every value expressible in the form
T'Machine_Emin
+/-mantissa*T'Machine_Radix
where mantissa is a nonzero T'Machine_Mantissa-digit fraction in the
number base T'Machine_Radix, the first digit of which is zero, is a
machine number, See section 3.5.7 Floating Point Types, of the type T; yields the value False
otherwise. The value of this attribute is of the predefined type
Boolean. See section A.5.3 Attributes of Floating Point Types.
-
S'Digits
For every decimal fixed point subtype S:
-
S'Digits denotes the digits of the decimal fixed point subtype S, which
corresponds to the number of decimal digits that are representable in
objects of the subtype. The value of this attribute is of the type
universal_integer. See section 3.5.10 Operations of Fixed Point Types.
-
S'Digits
For every floating point subtype S:
-
S'Digits denotes the requested decimal precision for the subtype S. The
value of this attribute is of the type universal_integer. See section 3.5.8 Operations of Floating Point Types.
-
S'Exponent
For every subtype S of a floating point type T:
-
S'Exponent denotes a function with the following specification:
-
function S'Exponent (X : T) return universal_integer
-
The function yields the normalized exponent of X. See section A.5.3 Attributes of Floating Point Types.
-
S'External_Tag
For every subtype S of a tagged type T (specific or class-wide):
-
S'External_Tag denotes an external string representation for S'Tag; it
is of the predefined type String. External_Tag may be specified for a
specific tagged type via an attribute_definition_clause; the expression
of such a clause shall be static. The default external tag
representation is implementation defined. See section 3.9.2 Dispatching Operations of Tagged Types, and
See section 13.13.2 Stream-Oriented Attributes. See section 13.3 Representation Attributes.
-
A'First(N)
For a prefix A that is of an array type (after any implicit
dereference), or denotes a constrained array subtype:
-
A'First(N) denotes the lower bound of the N-th index range; its type is
the corresponding index type. See section 3.6.2 Operations of Array Types.
-
A'First
For a prefix A that is of an array type (after any implicit
dereference), or denotes a constrained array subtype:
-
A'First denotes the lower bound of the first index range; its type is
the corresponding index type. See section 3.6.2 Operations of Array Types.
-
S'First
For every scalar subtype S:
-
S'First denotes the lower bound of the range of S. The value of this
attribute is of the type of S. See section 3.5 Scalar Types.
-
R.C'First_Bit
For a component C of a composite, non-array object R:
-
Denotes the offset, from the start of the first of the storage elements
occupied by C, of the first bit occupied by C. This offset is measured
in bits. The first bit of a storage element is numbered zero. The value
of this attribute is of the type universal_integer. See section 13.5.2 Storage Place Attributes.
-
S'Floor
For every subtype S of a floating point type T:
-
S'Floor denotes a function with the following specification:
-
function S'Floor (X : T) return T
-
The function yields the value Floor(X), i.e., the largest (most
positive) integral value less than or equal to X. When X is zero, the
result has the sign of X; a zero result otherwise has a positive sign.
See section A.5.3 Attributes of Floating Point Types.
-
S'Fore
For every fixed point subtype S:
-
S'Fore yields the minimum number of characters needed before the decimal
point for the decimal representation of any value of the subtype S,
assuming that the representation does not include an exponent, but
includes a one-character prefix that is either a minus sign or a space.
(This minimum number does not include superfluous zeros or underlines,
and is at least 2.) The value of this attribute is of the type
universal_integer. See section 3.5.10 Operations of Fixed Point Types.
-
S'Fraction
For every subtype S of a floating point type T:
-
S'Fraction denotes a function with the following specification:
-
function S'Fraction (X : T) return T
-
The function yields the value (X*T'Machine_Radix) ** -k, where k is the
normalized exponent of X. A zero result, which can only occur when X is
zero, has the sign of X. See section A.5.3 Attributes of Floating Point Types.
-
E'Identity
For a prefix E that denotes an exception:
-
E'Identity returns the unique identity of the exception. The type of
this attribute is Exception_Id. See section 11.4.1 The Package Exceptions.
-
T'Identity
For a prefix T that is of a task type (after any implicit dereference):
-
Yields a value of the type Task_ID that identifies the task denoted by
T. See section C.7.1 The Package Task_Identification.
-
S'Image
For every scalar subtype S:
-
S'Image denotes a function with the following specification:
-
function S'Image(Arg : S'Base) return String
-
The function returns an image of the value of Arg as a String.
See section 3.5 Scalar Types.
-
S'Class'Input
For every subtype S'Class of a class-wide type T'Class:
-
S'Class'Input denotes a function with the following specification:
-
function S'Class'Input
(Stream : access Ada.Streams.Root_Stream_Type'Class)
return T'Class
-
First reads the external tag from Stream and determines the
corresponding internal tag (by calling
Tags.Internal_Tag(String'Input(Stream)) -- See section 3.9 Tagged Types and Type Extensions.) and then
dispatches to the subprogram denoted by the Input attribute of the
specific type identified by the internal tag; returns that result.
See section 13.13.2 Stream-Oriented Attributes.
-
S'Input
For every subtype S of a specific type T:
-
S'Input denotes a function with the following specification:
-
function S'Input
(Stream : access Ada.Streams.Root_Stream_Type'Class)
return T
-
S'Input reads and returns one value from Stream, using any bounds or
discriminants written by a corresponding S'Output to determine how much
to read. See section 13.13.2 Stream-Oriented Attributes.
-
A'Last(N)
For a prefix A that is of an array type (after any implicit
dereference), or denotes a constrained array subtype:
-
A'Last(N) denotes the upper bound of the N-th index range; its type is
the corresponding index type. See section 3.6.2 Operations of Array Types.
-
A'Last
For a prefix A that is of an array type (after any implicit
dereference), or denotes a constrained array subtype:
-
A'Last denotes the upper bound of the first index range; its type is the
corresponding index type. See section 3.6.2 Operations of Array Types.
-
S'Last
For every scalar subtype S:
-
S'Last denotes the upper bound of the range of S. The value of this
attribute is of the type of S. See section 3.5 Scalar Types.
-
R.C'Last_Bit
For a component C of a composite, non-array object R:
-
Denotes the offset, from the start of the first of the storage elements
occupied by C, of the last bit occupied by C. This offset is measured in
bits. The value of this attribute is of the type universal_integer.
See section 13.5.2 Storage Place Attributes.
-
S'Leading_Part
For every subtype S of a floating point type T:
-
S'Leading_Part denotes a function with the following specification:
-
function S'Leading_Part
(X : T;
Radix_Digits : universal_integer) return T
-
Let v be the value T'Machine_Radix ** (k-Radix_Digits), where k is the
normalized exponent of X. The function yields the value
-
Floor(X/v)*v, when X is nonnegative and Radix_Digits is positive;
-
Ceiling(X/v)*v, when X is negative and Radix_Digits is positive.
-
Constraint_Error is raised when Radix_Digits is zero or negative. A zero
result, which can only occur when X is zero, has the sign of X.
See section A.5.3 Attributes of Floating Point Types.
-
A'Length(N)
For a prefix A that is of an array type (after any implicit
dereference), or denotes a constrained array subtype:
-
A'Length(N) denotes the number of values of the N-th index range (zero
for a null range); its type is universal_integer. See section 3.6.2 Operations of Array Types.
-
A'Length
For a prefix A that is of an array type (after any implicit
dereference), or denotes a constrained array subtype:
-
A'Length denotes the number of values of the first index range (zero for
a null range); its type is universal_integer. See section 3.6.2 Operations of Array Types.
-
S'Machine
For every subtype S of a floating point type T:
-
S'Machine denotes a function with the following specification:
-
function S'Machine (X : T) return T
-
If X is a machine number of the type T, the function yields X;
otherwise, it yields the value obtained by rounding or truncating X to
either one of the adjacent machine numbers of the type T.
Constraint_Error is raised if rounding or truncating X to the precision
of the machine numbers results in a value outside the base range of S. A
zero result has the sign of X when S'Signed_Zeros is True. See section A.5.3 Attributes of Floating Point Types.
-
S'Machine_Emax
For every subtype S of a floating point type T:
-
Yields the largest (most positive) value of exponent such that every
value expressible in the canonical form (for the type T), having a
mantissa of T'Machine_Mantissa digits, is a machine number,
See section 3.5.7 Floating Point Types, of the type T. This attribute yields a value of the type
universal_integer. See section A.5.3 Attributes of Floating Point Types.
-
S'Machine_Emin
For every subtype S of a floating point type T:
-
Yields the smallest (most negative) value of exponent such that every
value expressible in the canonical form (for the type T), having a
mantissa of T'Machine_Mantissa digits, is a machine number,
See section 3.5.7 Floating Point Types, of the type T. This attribute yields a value of the type
universal_integer. See section A.5.3 Attributes of Floating Point Types.
-
S'Machine_Mantissa
For every subtype S of a floating point type T:
-
Yields the largest value of p such that every value expressible in the
canonical form (for the type T), having a p-digit mantissa and an
exponent between T'Machine_Emin and T'Machine_Emax, is a machine number,
See section 3.5.7 Floating Point Types of the type T. This attribute yields a value of the type
universal_integer. See section A.5.3 Attributes of Floating Point Types.
-
S'Machine_Overflows
For every subtype S of a fixed point type T:
-
Yields the value True if overflow and divide-by-zero are detected and
reported by raising Constraint_Error for every predefined operation that
yields a result of the type T; yields the value False otherwise. The
value of this attribute is of the predefined type Boolean. See section A.5.4 Attributes of Fixed Point Types.
-
S'Machine_Overflows
For every subtype S of a floating point type T:
-
Yields the value True if overflow and divide-by-zero are detected and
reported by raising Constraint_Error for every predefined operation that
yields a result of the type T; yields the value False otherwise. The
value of this attribute is of the predefined type Boolean. See section A.5.3 Attributes of Floating Point Types.
-
S'Machine_Radix
For every subtype S of a fixed point type T:
-
Yields the radix of the hardware representation of the type T. The value
of this attribute is of the type universal_integer. See section A.5.4 Attributes of Fixed Point Types.
-
S'Machine_Radix
For every subtype S of a floating point type T:
-
Yields the radix of the hardware representation of the type T. The value
of this attribute is of the type universal_integer. See section A.5.3 Attributes of Floating Point Types.
-
S'Machine_Rounds
For every subtype S of a fixed point type T:
-
Yields the value True if rounding is performed on inexact results of
every predefined operation that yields a result of the type T; yields
the value False otherwise. The value of this attribute is of the
predefined type Boolean. See section A.5.4 Attributes of Fixed Point Types.
-
S'Machine_Rounds
For every subtype S of a floating point type T:
-
Yields the value True if rounding is performed on inexact results of
every predefined operation that yields a result of the type T; yields
the value False otherwise. The value of this attribute is of the
predefined type Boolean. See section A.5.3 Attributes of Floating Point Types.
-
S'Max
For every scalar subtype S:
-
S'Max denotes a function with the following specification:
-
function S'Max(Left, Right : S'Base) return S'Base
-
The function returns the greater of the values of the two parameters.
See section 3.5 Scalar Types.
-
S'Max_Size_In_Storage_Elements
For every subtype S:
-
Denotes the maximum value for Size_In_Storage_Elements that will be
requested via Allocate for an access type whose designated subtype is S.
The value of this attribute is of type universal_integer.
See section 13.11.1 The Max_Size_In_Storage_Elements Attribute.
-
S'Min
For every scalar subtype S:
-
S'Min denotes a function with the following specification:
-
function S'Min(Left, Right : S'Base) return S'Base
-
The function returns the lesser of the values of the two parameters.
See section 3.5 Scalar Types.
-
S'Model
For every subtype S of a floating point type T:
-
S'Model denotes a function with the following specification:
-
function S'Model (X : T) return T
-
If the Numerics Annex is not supported, the meaning of this attribute is
implementation defined; See section G.2.2 Model-Oriented Attributes of Floating Point Types, for the definition that applies to
implementations supporting the Numerics Annex. See section A.5.3 Attributes of Floating Point Types.
-
S'Model_Emin
For every subtype S of a floating point type T:
-
If the Numerics Annex is not supported, this attribute yields an
implementation defined value that is greater than or equal to the value
of T'Machine_Emin. See section G.2.2 Model-Oriented Attributes of Floating Point Types, for further requirements that apply to
implementations supporting the Numerics Annex. The value of this
attribute is of the type universal_integer. See section A.5.3 Attributes of Floating Point Types.
-
S'Model_Epsilon
For every subtype S of a floating point type T:
-
Yields the value T'Machine_Radix ** (1-T'Model_Mantissa). The value of
this attribute is of the type universal_real. See section A.5.3 Attributes of Floating Point Types.
-
S'Model_Mantissa
For every subtype S of a floating point type T:
-
If the Numerics Annex is not supported, this attribute yields an
implementation defined value that is greater than or equal to
Ceiling(d*log (10)/log (T'Machine_Radix))+1, where d is the requested
decimal precision of T, and less than or equal to the value of
T'Machine_Mantissa. See section G.2.2 Model-Oriented Attributes of Floating Point Types, for further requirements that apply to
implementations supporting the Numerics Annex. The value of this
attribute is of the type universal_integer. See section A.5.3 Attributes of Floating Point Types.
-
S'Model_Small
For every subtype S of a floating point type T:
-
Yields the value T'Machine_Radix ** (T'Model_Emin-1). The value of this
attribute is of the type universal_real. See section A.5.3 Attributes of Floating Point Types.
-
S'Modulus
For every modular subtype S:
-
S'Modulus yields the modulus of the type of S, as a value of the type
universal_integer. See section 3.5.4 Integer Types.
-
S'Class'Output
For every subtype S'Class of a class-wide type T'Class:
-
S'Class'Output denotes a procedure with the following specification:
-
procedure S'Class'Output
(Stream : access Ada.Streams.Root_Stream_Type'Class;
Item : in T'Class)
-
First writes the external tag of Item to Stream (by calling
String'Output(Tags.External_Tag(Item'Tag) -- See section 3.9 Tagged Types and Type Extensions.) and then
dispatches to the subprogram denoted by the Output attribute of the
specific type identified by the tag. See section 13.13.2 Stream-Oriented Attributes.
-
S'Output
For every subtype S of a specific type T:
-
S'Output denotes a procedure with the following specification:
-
procedure S'Output
(Stream : access Ada.Streams.Root_Stream_Type'Class;
Item : in T)
-
S'Output writes the value of Item to Stream, including any bounds or
discriminants. See section 13.13.2 Stream-Oriented Attributes.
-
D'Partition_ID
For a prefix D that denotes a library-level declaration, excepting a
declaration of or within a declared-pure library unit:
-
Denotes a value of the type universal_integer that identifies the
partition in which D was elaborated. If D denotes the declaration of a
remote call interface library unit, See section E.2.3 Remote Call Interface Library Units, the given partition is
the one where the body of D was elaborated. See section E.1 Partitions.
-
S'Pos
For every discrete subtype S:
-
S'Pos denotes a function with the following specification:
-
function S'Pos(Arg : S'Base) return universal_integer
-
This function returns the position number of the value of Arg, as a
value of type universal_integer. See section 3.5.5 Operations of Discrete Types.
-
R.C'Position
For a component C of a composite, non-array object R:
-
Denotes the same value as R.C'Address - R'Address. The value of this
attribute is of the type universal_integer. See section 13.5.2 Storage Place Attributes.
-
S'Pred
For every scalar subtype S:
-
S'Pred denotes a function with the following specification:
-
function S'Pred(Arg : S'Base) return S'Base
-
For an enumeration type, the function returns the value whose position
number is one less than that of the value of Arg; Constraint_Error is
raised if there is no such value of the type. For an integer type, the
function returns the result of subtracting one from the value of Arg.
For a fixed point type, the function returns the result of subtracting
small from the value of Arg. For a floating point type, the function
returns the machine number (as defined in See section 3.5.7 Floating Point Types.) immediately
below the value of Arg; Constraint_Error is raised if there is no such
machine number. See section 3.5 Scalar Types.
-
A'Range(N)
For a prefix A that is of an array type (after any implicit
dereference), or denotes a constrained array subtype:
-
A'Range(N) is equivalent to the range A'First(N) .. A'Last(N), except
that the prefix A is only evaluated once. See section 3.6.2 Operations of Array Types.
-
A'Range
For a prefix A that is of an array type (after any implicit
dereference), or denotes a constrained array subtype:
-
A'Range is equivalent to the range A'First .. A'Last, except that the
prefix A is only evaluated once. See section 3.6.2 Operations of Array Types.
-
S'Range
For every scalar subtype S:
-
S'Range is equivalent to the range S'First .. S'Last. See section 3.5 Scalar Types.
-
S'Class'Read
For every subtype S'Class of a class-wide type T'Class:
-
S'Class'Read denotes a procedure with the following specification:
-
procedure S'Class'Read
(Stream : access Ada.Streams.Root_Stream_Type'Class;
Item : out T'Class)
-
Dispatches to the subprogram denoted by the Read attribute of the
specific type identified by the tag of Item. See section 13.13.2 Stream-Oriented Attributes.
-
S'Read
For every subtype S of a specific type T:
-
S'Read denotes a procedure with the following specification:
-
procedure S'Read
(Stream : access Ada.Streams.Root_Stream_Type'Class;
Item : out T)
-
S'Read reads the value of Item from Stream. See section 13.13.2 Stream-Oriented Attributes.
-
S'Remainder
For every subtype S of a floating point type T:
-
S'Remainder denotes a function with the following specification:
-
function S'Remainder (X, Y : T) return T
-
For nonzero Y, let v be the value X-n*Y, where n is the integer nearest
to the exact value of X/Y; if |n-X/Y|=1/2, then n is chosen to be even.
If v is a machine number of the type T, the function yields v;
otherwise, it yields zero. Constraint_Error is raised if Y is zero. A
zero result has the sign of X when S'Signed_Zeros is True. See section A.5.3 Attributes of Floating Point Types.
-
S'Round
For every decimal fixed point subtype S:
-
S'Round denotes a function with the following specification:
-
function S'Round(X : universal_real) return S'Base
-
The function returns the value obtained by rounding X (away from 0, if X
is midway between two values of the type of S). See section 3.5.10 Operations of Fixed Point Types.
-
S'Rounding
For every subtype S of a floating point type T:
-
S'Rounding denotes a function with the following specification:
-
function S'Rounding (X : T) return T
-
The function yields the integral value nearest to X, rounding away from
zero if X lies exactly halfway between two integers. A zero result has
the sign of X when S'Signed_Zeros is True. See section A.5.3 Attributes of Floating Point Types.
-
S'Safe_First
For every subtype S of a floating point type T:
-
Yields the lower bound of the safe range, See section 3.5.7 Floating Point Types, of the type T.
If the Numerics Annex is not supported, the value of this attribute is
implementation defined; See section G.2.2 Model-Oriented Attributes of Floating Point Types, for the definition that applies to
implementations supporting the Numerics Annex. The value of this
attribute is of the type universal_real. See section A.5.3 Attributes of Floating Point Types.
-
S'Safe_Last
For every subtype S of a floating point type T:
-
Yields the upper bound of the safe range, See section 3.5.7 Floating Point Types of the type T. If
the Numerics Annex is not supported, the value of this attribute is
implementation defined; See section G.2.2 Model-Oriented Attributes of Floating Point Types, for the definition that applies to
implementations supporting the Numerics Annex. The value of this
attribute is of the type universal_real. See section A.5.3 Attributes of Floating Point Types.
-
S'Scale
For every decimal fixed point subtype S:
-
S'Scale denotes the scale of the subtype S, defined as the value N such
that S'Delta = 10.0**(-N). The scale indicates the position of the point
relative to the rightmost significant digits of values of subtype S. The
value of this attribute is of the type universal_integer. See section 3.5.10 Operations of Fixed Point Types.
-
S'Scaling
For every subtype S of a floating point type T:
-
S'Scaling denotes a function with the following specification:
-
function S'Scaling
(X : T;
Adjustment : universal_integer) return T
-
Let v be the value X*T'Machine_Radix ** Adjustment. If v is a machine
number of the type T, or if |v|>=T'Model_Small, the function yields v;
otherwise, it yields either one of the machine numbers of the type T
adjacent to v. Constraint_Error is optionally raised if v is outside the
base range of S. A zero result has the sign of X when S'Signed_Zeros is
True. See section A.5.3 Attributes of Floating Point Types.
-
S'Signed_Zeros
For every subtype S of a floating point type T:
-
Yields the value True if the hardware representation for the type T has
the capability of representing both positively and negatively signed
zeros, these being generated and used by the predefined operations of
the type T as specified in IEC 559:1989; yields the value False
otherwise. The value of this attribute is of the predefined type
Boolean. See section A.5.3 Attributes of Floating Point Types.
-
S'Size
For every subtype S:
-
If S is definite, denotes the size (in bits) that the implementation
would choose for the following objects of subtype S:
-
A record component of subtype S when the record type is packed.
-
The formal parameter of an instance of Unchecked_Conversion that
converts from subtype S to some other subtype.
-
If S is indefinite, the meaning is implementation defined. The value of
this attribute is of the type universal_integer. See section 13.3 Representation Attributes.
-
X'Size
For a prefix X that denotes an object:
-
Denotes the size in bits of the representation of the object. The value
of this attribute is of the type universal_integer. See section 13.3 Representation Attributes.
-
S'Small
For every fixed point subtype S:
-
S'Small denotes the small of the type of S. The value of this attribute
is of the type universal_real. See section 3.5.10 Operations of Fixed Point Types.
-
S'Storage_Pool
For every access subtype S:
-
Denotes the storage pool of the type of S. The type of this attribute is
Root_Storage_Pool'Class. See section 13.11 Storage Management.
-
S'Storage_Size
For every access subtype S:
-
Yields the result of calling Storage_Size(S'Storage_Pool), which is
intended to be a measure of the number of storage elements reserved for
the pool. The type of this attribute is universal_integer. See section 13.11 Storage Management.
-
T'Storage_Size
For a prefix T that denotes a task object (after any implicit
dereference):
-
Denotes the number of storage elements reserved for the task. The value
of this attribute is of the type universal_integer. The Storage_Size
includes the size of the task's stack, if any. The language does not
specify whether or not it includes other storage associated with the
task (such as the "task control block" used by some implementations.)
See section 13.3 Representation Attributes.
-
S'Succ
For every scalar subtype S:
-
S'Succ denotes a function with the following specification:
-
function S'Succ(Arg : S'Base) return S'Base
-
For an enumeration type, the function returns the value whose position
number is one more than that of the value of Arg; Constraint_Error is
raised if there is no such value of the type. For an integer type, the
function returns the result of adding one to the value of Arg. For a
fixed point type, the function returns the result of adding small to the
value of Arg. For a floating point type, the function returns the
machine number (as defined in See section 3.5.7 Floating Point Types.) immediately above the value
of Arg; Constraint_Error is raised if there is no such machine number.
See section 3.5 Scalar Types.
-
S'Tag
For every subtype S of a tagged type T (specific or class-wide):
-
S'Tag denotes the tag of the type T (or if T is class-wide, the tag of
the root type of the corresponding class). The value of this attribute
is of type Tag. See section 3.9 Tagged Types and Type Extensions.
-
X'Tag
For a prefix X that is of a class-wide tagged type (after any implicit
dereference):
-
X'Tag denotes the tag of X. The value of this attribute is of type Tag.
See section 3.9 Tagged Types and Type Extensions.
-
T'Terminated
For a prefix T that is of a task type (after any implicit dereference):
-
Yields the value True if the task denoted by T is terminated, and False
otherwise. The value of this attribute is of the predefined type
Boolean. See section 9.9 Task and Entry Attributes.
-
S'Truncation
For every subtype S of a floating point type T:
-
S'Truncation denotes a function with the following specification:
-
function S'Truncation (X : T) return T
-
The function yields the value Ceiling(X) when X is negative, and
Floor(X) otherwise. A zero result has the sign of X when S'Signed_Zeros
is True. See section A.5.3 Attributes of Floating Point Types.
-
S'Unbiased_Rounding
For every subtype S of a floating point type T:
-
S'Unbiased_Rounding denotes a function with the following specification:
-
function S'Unbiased_Rounding (X : T) return T
-
The function yields the integral value nearest to X, rounding toward the
even integer if X lies exactly halfway between two integers. A zero
result has the sign of X when S'Signed_Zeros is True. See section A.5.3 Attributes of Floating Point Types.
-
X'Unchecked_Access
For a prefix X that denotes an aliased view of an object:
-
All rules and semantics that apply to X'Access, See section 3.10.2 Operations of Access Types, apply
also to X'Unchecked_Access, except that, for the purposes of
accessibility rules and checks, it is as if X were declared immediately
within a library package. See section 13.10 Unchecked Access Value Creation.
-
S'Val
For every discrete subtype S:
-
S'Val denotes a function with the following specification:
-
function S'Val(Arg : universal_integer) return S'Base
-
This function returns a value of the type of S whose position number
equals the value of Arg. See section 3.5.5 Operations of Discrete Types.
-
262 X'Valid
For a prefix X that denotes a scalar object (after any implicit
dereference):
-
Yields True if and only if the object denoted by X is normal and has a
valid representation. The value of this attribute is of the predefined
type Boolean. See section 13.9.2 The Valid Attribute.
-
S'Value
For every scalar subtype S:
-
S'Value denotes a function with the following specification:
-
function S'Value(Arg : String) return S'Base
-
This function returns a value given an image of the value as a String,
ignoring any leading or trailing spaces. See section 3.5 Scalar Types.
-
P'Version
For a prefix P that statically denotes a program unit:
-
Yields a value of the predefined type String that identifies the version
of the compilation unit that contains the declaration of the program
unit. See section E.3 Consistency of a Distributed System.
-
S'Wide_Image
For every scalar subtype S:
-
S'Wide_Image denotes a function with the following specification:
-
function S'Wide_Image(Arg : S'Base) return Wide_String
-
The function returns an image of the value of Arg, that is, a sequence
of characters representing the value in display form. See section 3.5 Scalar Types.
-
S'Wide_Value
For every scalar subtype S:
-
S'Wide_Value denotes a function with the following specification:
-
function S'Wide_Value(Arg : Wide_String) return S'Base
-
This function returns a value given an image of the value as a
Wide_String, ignoring any leading or trailing spaces. See section 3.5 Scalar Types.
-
S'Wide_Width
For every scalar subtype S:
-
S'Wide_Width denotes the maximum length of a Wide_String returned by
S'Wide_Image over all values of the subtype S. It denotes zero for a
subtype that has a null range. Its type is universal_integer.
See section 3.5 Scalar Types.
-
S'Width
For every scalar subtype S:
-
S'Width denotes the maximum length of a String returned by S'Image over
all values of the subtype S. It denotes zero for a subtype that has a
null range. Its type is universal_integer. See section 3.5 Scalar Types.
-
S'Class'Write
For every subtype S'Class of a class-wide type T'Class:
-
S'Class'Write denotes a procedure with the following specification:
-
procedure S'Class'Write
(Stream : access Ada.Streams.Root_Stream_Type'Class;
Item : in T'Class)
-
Dispatches to the subprogram denoted by the Write attribute of the
specific type identified by the tag of Item. See section 13.13.2 Stream-Oriented Attributes.
-
S'Write
For every subtype S of a specific type T:
-
S'Write denotes a procedure with the following specification:
-
procedure S'Write
(Stream : access Ada.Streams.Root_Stream_Type'Class;
Item : in T)
-
S'Write writes the value of Item to Stream. See section 13.13.2 Stream-Oriented Attributes.
Go to the first, previous, next, last section, table of contents.