![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Function Fixed_Accuracy_Definition
function Fixed_Accuracy_Definition (Constraint : in Asis.Constraint) return Asis.Expression;Expanded Name Asis.Type_Definitions.Fixed_Accuracy_Definition
Returns the simple expression following the reserved word delta in the specified fixed-point constraint.
Description
Fixed-point constraints are defined by the following syntax:
Ada83 LRM 3.5.9, Ada95 LRM 3.5.9
fixed_point_constraint ::=
fixed_accuracy_definition
[range_constraint]
fixed_accuracy_definition ::=
delta static_simple_expressionThis function returns the static simple expression from the specified fixed-point constraint.
Parameters
Constraint : in Asis.Constraint;Specifies the fixed-point constraint that should be queried. The constraint must be of the following kinds:
Element_Kinds Constraint_Kinds
A_Constraint A_Fixed_Point_Constraint
return Asis.Expression;The returned element is of the following kind:
Element_Kinds
An_Expression
Errors
Asis_Inappropriate_Element is raised and Environment.Status is set to Value_Error if a parameter references a library variable that is no longer open, or a parameter is specified that is not appropriate for the query.
Examples
Cross-References
- function Constraint_Kind
- function Fixed_Point_Range_Constraint
- function Real_Type_Constraint
- function Subtype_Constraint
- "Processing Real-Subtype Definitions"
- package Expressions, "Processing Expressions"
- Ada83 LRM 3.5.9, Ada95 LRM 3.5.9
Function Fixed_Point_Range_Constraint
function Fixed_Point_Range_Constraint (Constraint : in Asis.Constraint) return Asis.Range_Constraint;Expanded Name Asis.Type_Definitions.Fixed_Point_Range_Constraint
Returns the range constraint associated with the specified fixed- point constraint.
Description
Fixed-point constraints are partially defined by the following syntax:
Ada83 LRM 3.5.9, Ada95 LRM 3.5.9
fixed_point_constraint ::=
fixed_accuracy_definition
[range_constraint]This function returns the range constraint from the specified fixed-point constraint.
If a range constraint does not exist, Asis.Nil_Element is returned.
Parameters
Constraint : in Asis.Constraint;Specifies the fixed-point constraint that should be queried. The constraint must be of the following kinds:
Element_Kinds Constraint_Kinds
A_Constraint A_Fixed_Point_Constraint
return Asis.Range_Constraint;The returned element is of the following kinds:
Element_Kinds Constraint_Kinds
A_Constraint A_Simple_Range
Errors
Asis_Inappropriate_Element is raised and Environment.Status is set to Value_Error if a parameter references a library variable that is no longer open, or a parameter is specified that is not appropriate for the query.
Examples
Cross-References
- function Constraint_Kind
- function Fixed_Accuracy_Definition
- function Real_Type_Constraint
- function Subtype_Constraint
- "Processing Real-Subtype Definitions"
- Ada83 LRM 3.5.9, Ada95 LRM 3.5.9
Function Floating_Accuracy_Definition
function Floating_Accuracy_Definition (Constraint : in Asis.Constraint) return Asis.Expression;Expanded Name Asis.Type_Definitions.Floating_Accuracy_Definition
Returns the simple expression following the reserved word digits in the specified floating-point constraint.
Description
Floating-point constraints are partially defined by the following syntax:
Ada83 LRM 3.5.7, Ada95 LRM 3.5.7
floating_point_constraint ::=
floating_accuracy_definition
[range_constraint]
floating_accuracy_definition ::=
digits static_simple_expressionThis function returns the static simple expression from the specified floating-point constraint.
Parameters
Constraint : in Asis.Constraint;Specifies the floating-point constraint that should be queried. The constraint must be of the following kinds:
Element_Kinds Constraint_Kinds
A_Constraint A_Floating_Point_Constraint
return Asis.Expression;The returned element is of the following kind:
Element_Kinds
An_Expression
Errors
Asis_Inappropriate_Element is raised and Environment.Status is set to Value_Error if a parameter references a library variable that is no longer open, or a parameter is specified that is not appropriate for the query.
Examples
Cross-References
- function Constraint_Kind
- function Floating_Point_Range_Constraint
- function Real_Type_Constraint
- function Subtype_Constraint
- "Processing Real-Subtype Definitions"
- package Expressions, "Processing Expressions"
- Ada83 LRM 3.5.7, Ada95 LRM 3.5.7
Function Floating_Point_Range_Constraint
function Floating_Point_Range_Constraint (Constraint : in Asis.Constraint) return Asis.Range_Constraint;Expanded Name Asis.Type_Definitions.Floating_Point_Range_Constraint
Returns the range constraint associated with the specified floating-point constraint.
Description
Floating-point constraints are partially defined by the following syntax:
Ada83 LRM 3.5.7, Ada95 LRM 3.5.7
floating_point_constraint ::=
floating_accuracy_definition
[range_constraint]This function returns the range constraint from the specified floating-point constraint.
If a range constraint does not exist, Asis.Nil_Element is returned.
Parameters
Constraint : in Asis.Constraint;Specifies the floating-point constraint that should be queried. The constraint must be of the following kinds:
Element_Kinds Constraint_Kinds
A_Constraint A_Floating_Point_Constraint
return Asis.Range_Constraint;The returned element is of the following kinds:
Element_Kinds Constraint_Kinds
A_Constraint A_Simple_Range
Errors
Asis_Inappropriate_Element is raised and Environment.Status is set to Value_Error if a parameter references a library variable that is no longer open, or a parameter is specified that is not appropriate for the query.
Examples
Cross-References
- function Constraint_Kind
- function Floating_Accuracy_Definition
- function Real_Type_Constraint
- function Subtype_Constraint
- "Processing Real-Subtype Definitions"
- Ada83 LRM 3.5.7, Ada95 LRM 3.5.7
Function Ground_Type
function Ground_Type (Type_Definition : in Asis.Type_Definition) return Asis.Type_Definition;Expanded Name Asis.Type_Definitions.Ground_Type
Returns the type definition from which the specified type definition was first derived.
Description
This function recursively unwinds all subtype and derived-type definitions and returns the ground-type definition.
The ground-type definition can be an enumeration, an Ada predefined type from package Standard, a record, or an array.
Parameters
Type_Definition : in Asis.Type_Definition;Specifies the type definition that should be queried. The type definition must be of the following kind:
Element_Kinds
A_Type_Definition
return Asis.Type_Definition;The returned element is of the following kind:
Element_Kinds
A_Type_Definition
Errors
Asis_Inappropriate_Element is raised and Environment.Status is set to Value_Error if a parameter references a library variable that is no longer open, or a parameter is specified that is not appropriate for the query.
Asis_Failed is raised and Environment.Status is set to Obso-
lete_Reference_Error if a parameter is part of an obsolete
compilation unit.Examples
Cross-References
- function Base_Type
- function Is_Predefined
- function Last_Constraint
- function Last_Subtype
- function Parent_Subtype
- function Parent_Type
- function Type_Structure
Function Implicit_Components
function Implicit_Components (Type_Definition : in Asis.Type_Definition; return Asis.Record_Component_List;Expanded Name Asis.Type_Definitions.Implicit_Components
Returns a list of the all implementation-defined components in the specified record-type definition.
Description
Record-type definitions are defined by the following syntax:
Ada83 LRM 3.7, Ada95 LRM 3.8
record_type_definition ::=
record
component_list
end recordThis function returns a list of the all implementation-defined components (Ada83 LRM 13.4(8), Ada95 LRM 13.5.1) that exist in the component list for the specified record-type definition.
If no implementation-defined components exist, Asis.Nil_Element-_List is returned.
Each component will test as Declarations.Is_Part_Of_Implicit.
Parameters
Type_Definition : in Asis.Type_Definition;Specifies the record-type definition that should be queried. The type definition must be of the following kinds:
Element_Kinds Type_Definition_Kinds
A_Type_Definition A_Derived_Type_Definition1 A_Record_Type_Definition
1 Whose parent type is a record type.
return Asis.Record_Component_List;The returned list contains elements of the following kinds:
Element_Kinds Declaration_Kinds
A_Declaration A_Component_Declaration
Errors
Asis_Inappropriate_Element is raised and Environment.Status is set to Value_Error if a parameter references a library variable that is no longer open, or a parameter is specified that is not appropriate for the query.
Examples
Cross-References
- function Component_Kind
- function Corresponding_Discriminant_Simple_Name
- function Record_Components
- function Variant_Components
- function Variants
- function Declarations.Initial_Value
- function Declarations.Is_Initialized
Function Implicit_Variant_Components
function Implicit_Variant_Components (Variant : in Asis.Variant; return Asis.Variant_Component_List;Expanded Name Asis.Type_Definitions.Implicit_Variant_Components
Returns a list of the all implementation-defined components in the specified record variant.
Description
Record variants are partially defined by the following syntax:
Ada83 LRM 3.7.3, Ada95 LRM 3.8.1
variant ::=
when choice {| choice} =>
component_listThis function returns a list of the all implementation-defined components (Ada83 LRM 13.4(8), Ada95 LRM 13.5.1) that exist in the component list for the specified variant.
If no implementation-defined components exist, Asis.Nil_Element-_List is returned.
Each component will test as Declarations.Is_Part_Of_Implicit.
Parameters
Variant : in Asis.Variant;Specifies the record variant that should be queried. The variant must be of the following kind:
Element_Kinds
A_Variant
return Asis.Variant_Component_List;The returned list contains elements of the following kinds:
Element_Kinds Declaration_Kinds
A_Declaration A_Component_Declaration
Errors
Asis_Inappropriate_Element is raised and Environment.Status is set to Value_Error if a parameter references a library variable that is no longer open, or a parameter is specified that is not appropriate for the query.
Examples
Cross-References
- "Processing Record-Type Definitions"
- Ada83 LRM 3.7.3, Ada95 LRM 3.8.1
- Ada83 LRM 13.4, Ada95 LRM
13.5.1
Function Index_Constraint
function Index_Constraint (Type_Definition : in Asis.Type_Definition) return Asis.Constraint;Expanded Name Asis.Type_Definitions.Index_Constraint
Returns the index constraint associated with the specified constraint array-type definition.
Description
Constrained array-index constraint definitions are partially defined by the following syntax:
Ada83 LRM 3.6, Ada95 LRM 3.6
constrained_array_definition ::=
array index_constraint of
component_subtype_indication
index_constraint ::=
(discrete_range {, discrete_range})This function returns the index constraint for the specified constrained-array definition.
You can obtain the list of discrete ranges that make up the index constraint with the Discrete_Ranges function.
Parameters
Type_Definition : in Asis.Type_Definition;Specifies the constrained-array definition that should be queried. The type definition must be of the following kind:
Element_Kinds Type_Definition_Kinds
A_Type_Definition A_Derived_Type_Definition1
A_Generic_Array_Type_Definition
An_Array_Type_Definition
1 Whose parent type is an array type.
return Asis.Constraint;The returned element is of the following kinds:
Element_Kinds Constraint_Kinds
A_Constraint An_Index_Constraint
Errors
Asis_Inappropriate_Element is raised and Environment.Status is set to Value_Error if a parameter references a library variable that is no longer open, or a parameter is specified that is not appropriate for the query.
Asis_Inappropriate_Element is raised and Environment.Status is set to Value_Error if the Type_Definition parameter does not represent a constrained-array definition.
Examples
Cross-References
- "Processing Array-Type Definitions"
- Ada83 LRM 3.6, Ada95 LRM 3.6
Function Index_Subtype_Definitions
function Index_Subtype_Definitions (Type_Definition : in Asis.Type_Definition) return Asis.Expression_List;Expanded Name Asis.Type_Definitions.Index_Subtype_Definitions
Returns a list of the index-subtype definitions associated with the specified unconstrained array-type definition.
Description
Unconstrained array-type definitions are partially defined by the following syntax:
Ada83 LRM 3.6, Ada95 LRM 3.6
unconstrained_array_definition ::=
array(index_subtype_definition
{, index_subtype_definition}) of
component_subtype_indicationindex_subtype_definition ::= type_mark range <>
This function returns a list of the index-subtype definitions from the specified unconstrained-array definition.
The expressions contained in the returned list represent the type marks of the index-subtype definition. The type marks are returned in their order of appearance in the source code.
Parameters
Type_Definition : in Asis.Type_Definition;Specifies the unconstrained-array definition that should be queried. The type definition must be of the following kind:
Element_Kinds
A_Type_Definition
return Asis.Expression_List;The returned list contains elements of the following kind:
Element_Kinds
An_Expression
Errors
Asis_Inappropriate_Element is raised and Environment.Status is set to Value_Error if a parameter references a library variable that is no longer open, or a parameter is specified that is not appropriate for the query.
Asis_Inappropriate_Element is raised and Environment.Status is set to Value_Error if the Type_Definition parameter does not represent an unconstrained-array definition.
Examples
Cross-References
- "Processing Array-Type Definitions"
- package Expressions, "Processing Selected Components"
- Ada83 LRM 3.6, Ada95 LRM 3.6
Function Integer_Constraint
function Integer_Constraint (Type_Definition : in Asis.Type_Definition) return Asis.Range_Constraint;Expanded Name Asis.Type_Definitions.Integer_Constraint
Returns the range constraint associated with the specified integer-type definition.
Description
Integer-type definitions are defined by the following syntax:
Ada83 LRM 3.5.4, Ada95 LRM 3.5.4
integer_type_definition ::= range_constraintThis function returns the range constraint from the specified integer-type definition.
Parameters
Type_Definition : in Asis.Type_Definition;Specifies the integer-type definition that should be queried. The type definition must be of the following kinds:
Element_Kinds Type_Definition_Kinds
A_Type_Definition An_Integer_Type_Definition
return Asis.Range_Constraint;The returned element is of the following kinds:
Element_Kinds Constraint_Kinds Discrete_Range-_Kinds
A_Constraint A_Range_Attribute ——
A_Constraint A_Simple_Range A_Simple_Range
Errors
Asis_Inappropriate_Element is raised and Environment.Status is set to Value_Error if a parameter references a library variable that is no longer open, or a parameter is specified that is not appropriate for the query.
Examples
Cross-References
Function Is_Constrained_Array
function Is_Constrained_Array (Type_Definition : in Asis.Type_Definition) return Boolean;Expanded Name Asis.Type_Definitions.Is_Constrained_Array
Returns a Boolean value indicating whether the specified type definition is a constrained array.
Description
Type definitions are partially defined by the following syntax:
Ada83 LRM 3.3.1, Ada95 LRM 3.2.1
type_definition ::=
enumeration_type_definition
| integer_type_definition
| real_type_definition
| array_type_definition
| record_type_definition
| access_type_definition
| derived_type_definitionArray-type definitions are defined by the following syntax:
Ada83 LRM 3.6, Ada95 LRM 3.6
array_type_definition ::=
unconstrained_array_definition
| constrained_array_definitionGeneric-parameter declarations are partially defined by the following syntax:
Ada83 LRM 12.1, Ada95 LRM 12.1
generic_parameter_declaration ::=
identifier list : [in [out]] type_mark
[:= expression]
| type identifier
is generic_type_specification
| private_type_declaration
| with subprogram_specification [is name];
| with subprogram_specification [is <>];This function returns True if the specified type definition is for a constrained-array definition or a constrained array in a generic- parameter declaration.
Parameters
Type_Definition : in Asis.Type_Definition;Specifies the type definition that should be queried. The type definition must be of the following kinds:
Element_Kinds Type_Definition_Kinds
A_Type_Definition A_Generic_Array_Type_Definition
An_Array_Type_Definition
return Boolean;Returns True for all elements in the above table that also represent constrained-array definitions and False for all other elements.
Errors
Examples
Cross-References
- "Processing Array-Type Definitions"
- Ada83 LRM 3.6, Ada95 LRM 3.6
Rational Software Corporation
http://www.rational.com support@rational.com techpubs@rational.com Copyright © 1993-2001, Rational Software Corporation. All rights reserved. |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |