TOC PREV NEXT INDEX DOC LIST MASTER INDEX




Function Fixed_Accuracy_Definition

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_expression

This function returns the static simple expression from the specified fixed-point constraint.

Parameters

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

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

Related subprograms:

Related concepts:


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

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

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

Related subprograms:

Related concepts:


Function Floating_Accuracy_Definition

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_expression

This function returns the static simple expression from the specified floating-point constraint.

Parameters

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

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

Related subprograms:

Related concepts:


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

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

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

Related subprograms:

Related concepts:


Function Ground_Type

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

Specifies the type definition that should be queried. The type definition must be of the following kind:
Element_Kinds

A_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

Related subprograms:

Related concept:


Function Implicit_Components

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 record

This 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

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.

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

Related subprograms:

Related concepts:


Function Implicit_Variant_Components

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_list

This 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

Specifies the record variant that should be queried. The variant must be of the following kind:
Element_Kinds

A_Variant

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

Related subprograms:

Related concepts:


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

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.

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

Related subprograms:

Related concepts:


Function Index_Subtype_Definitions

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_indication

 index_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

Specifies the unconstrained-array definition that should be queried. The type definition must be of the following kind:
Element_Kinds

A_Type_Definition

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

Related subprograms:

Related concepts:


Function Integer_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_constraint

This function returns the range constraint from the specified integer-type definition.

Parameters

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

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

Related subprograms:

Related concepts:


Function Is_Constrained_Array

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_definition

Array-type definitions are defined by the following syntax:

Ada83 LRM 3.6, Ada95 LRM 3.6
 array_type_definition ::=
   unconstrained_array_definition
  | constrained_array_definition

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

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

Returns True for all elements in the above table that also represent constrained-array definitions and False for all other elements.

Errors

None.

Examples

Cross-References

Related subprograms:

Related concepts:


Rational Software Corporation  http://www.rational.com
support@rational.com
techpubs@rational.com
Copyright © 1993-2001, Rational Software Corporation. All rights reserved.
TOC PREV NEXT INDEX DOC LIST MASTER INDEX TECHNOTES APEX TIPS