TOC PREV NEXT INDEX DOC LIST MASTER INDEX




Function Access_To

Expanded Name Asis.Type_Definitions.Access_To

Returns the subtype indication following the reserved word access in the access-type definition.

Description

Access-type definitions are defined by the following syntax:

Ada83 LRM 3.8, Ada95 LRM 3.10
 access_type_definition ::=
  access subtype_indication

This function returns the subtype indication for the specified access-type definition.

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

The returned element is of the following kind:
Element_Kinds

A_Subtype_Indication

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

Related concepts:


Function Base_Type

Expanded Name Asis.Type_Definitions.Base_Type

Returns the type mark of the subtype indication associated with the specified subtype declaration or derived-type definition.

Description

A subtype is a type and an optional constraint (Ada83 LRM 3.3, Ada95 LRM 3.2). This function returns the type to which the constraint was applied or the subtype indication specified in a derived-type definition.

If a base type is specified, then the function acts as an identity function and returns the base type.

An anonymous array type (Ada83 LRM 3.6, Ada95 LRM 3.6) is its own base type.

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


Function Choice_Discrete_Range

Expanded Name Asis.Type_Definitions.Choice_Discrete_Range

Returns the discrete range associated with the specified choice.

Description

Choices are partially defined by the following syntax:

Ada83 LRM 3.7.3, Ada95 LRM 3.8.1
 choice ::= simple_expression
  | discrete_range
  | others
  | component_simple_name

This function returns the discrete range (Ada83 LRM 3.6, Ada95 LRM 3.6) of the specified choice.

Parameters

Specifies the choice that should be queried. The choice must be of the following kinds:
Element_Kinds
Choice_Kinds
A_Choice
A_Discrete_Range

The returned element is of the following kind:
Element_Kinds

A_Discrete_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 and types:

Related concepts:


Function Choice_Kind

Expanded Name Asis.Type_Definitions.Choice_Kind

Returns the kind of the specified choice.

Description

Choices are partially defined by the following syntax:

Ada83 LRM 3.7.3, Ada95 LRM 3.8.1
 choice ::= simple_expression
  | discrete_range
  | others
  | component_simple_name

Ada83 LRM 11.2, Ada95 LRM 11.2
 exception_choice ::= exception_name | others

This function returns the kind of the specified choice or exception choice.

Parameters

Specifies the choice that should be queried. The Choice parameter must be of the following kind:
Element_Kinds

A_Choice

Returns the kind of the choice represented by the Choice parameter. If the Choice parameter is neither a choice nor an exception choice, Not_A_Choice is returned.

Errors

None.

Examples

Cross-References

Related subprograms and types:

Related concepts:


Type Choice_Kinds

Expanded Name Asis.Type_Definitions.Choice_Kinds

Describes the kinds of choices available in record-definition variants (Ada83 LRM 3.7.3, Ada95 LRM 3.8.1), record and array aggregates (Ada83 LRM 4.3, Ada95 LRM 4.3), case-statement alternatives (Ada83 LRM 5.4, Ada95 LRM 5.4), and exception handlers (Ada83 LRM 11.2, Ada95 LRM 11.2).

Description

Choices are partially defined by the following syntax:

Ada83 LRM 3.7.3, Ada95 LRM 3.8.1
 choice ::= simple_expression
  | discrete_range
  | others
  | component_simple_name

Ada83 LRM 11.2, Ada95 LRM 11.2 
exception_choice ::= exception_name | others

Choices appear in:

This enumeration describes the kinds of choices available in choice and exception choice.

Enumerations

Indicates that the element represents a discrete range (Ada83 LRM 3.6, Ada95 LRM 3.6).

Indicates that the element represents a simple expression (Ada83 LRM 3.5, Ada95 LRM 3.5).

Indicates that the element represents a simple name (Ada83 LRM 3.7.3, Ada95 LRM 3.8.1).

Indicates that the element represents an exception name (Ada83 LRM 11.2, Ada95 LRM 11.2).

Indicates that the element represents the reserved word others (Ada83 LRM 3.7.3, and 11.2, Ada95 LRM 3.8.1 and 11.2).

Indicates that the element does not represent a choice.

Cross-References

Related subprograms:

Related concepts:


Function Choice_Name

Expanded Name Asis.Type_Definitions.Choice_Name

Returns the name associated with the specified choice.

Description

Choices are partially defined by the following syntax:

Ada83 LRM 3.7.3, Ada95 LRM 3.8.1
 choice ::= simple_expression
  | discrete_range
  | others
  | component_simple_name

Ada83 LRM 11.2, Ada95 LRM 11.2
 exception_choice ::= exception_name | others

This function returns the component simple name (Ada83 LRM 4.1, Ada95 LRM 4.1) or exception name represented by the specified choice.

Parameters

Specifies the choice that should be queried. The choice must be of the following kinds:
Element_Kinds
Choice_Kinds
A_Choice
A_Simple_Name
An_Exception_Name

The returned element is of the following kinds:
Element_Kinds
Expression_Kinds
An_Expression
A_Selected_Component
A_Simple_Name

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 Choice_Simple_Expression

Expanded Name Asis.Type_Definitions.Choice_Simple_Expression

Returns the expression associated with the specified choice.

Description

Choices are partially defined by the following syntax:

Ada83 LRM 3.7.3, Ada95 LRM 3.8.1
 choice ::= simple_expression
  | discrete_range
  | others
  | component_simple_name

This function returns the simple expression (Ada83 LRM 4.4, Ada95 LRM 4.4) of the specified choice.

Parameters

Specifies the choice that should be queried. The choice must be of the following kinds:
Element_Kinds
Choice_Kinds
A_Choice
A_Simple_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

Related subprograms:

Related concepts:


Function Component_Kind

Expanded Name Asis.Type_Definitions.Component_Kind

Returns the kind of component associated with the specified component.

Description

Record-component definitions are partially defined by the following syntax:

Ada83 LRM 3.7, Ada95 LRM 3.7
 component_list ::=
   component_declaration
     {component_declaration}
  | {component_declaration} variant_part
  | null;

This function returns the kind of component (component declaration, variant part, or null) represented by the specified component.

Components can be analyzed with subprograms in the package Declarations.

Parameters

Specifies the record component that should be queried. The component must be of the following kinds:
Element_Kinds
Declaration_Kinds
A_Declaration
A_Component_Declaration
A_Null_Component
——
A_Variant
——

Returns the kind of component represented by the specified component or Not_A_Component if component is not a record component.

Errors

None.

Examples

Cross-References

Related subprograms and types:

Related concepts:


Type Component_Kinds

Expanded Name Asis.Type_Definitions.Component_Kinds

Describes the kinds of components available in record-type
definitions.

Description

Record-component definitions are partially defined by the following syntax:

Ada83 LRM 3.7, Ada95 LRM 3.7
 component_list ::=
   component_declaration
     {component_declaration}
  | {component_declaration} variant_part
  | null;

This enumeration describes the kinds of components available in a component list.

Enumerations

Indicates that the element represents a component declaration (Ada83 LRM 3.7, Ada95 LRM 3.7).

Indicates that the element represents a null component (Ada83 LRM 3.7, Ada95 LRM 3.7).

Indicates that the element represents a variant (Ada83 LRM 3.7.3, Ada95 LRM 3.8.1).

Indicates that the element does not represent a record
component.

Cross-References

Related subprograms:

Related concepts:


Function Component_Subtype_Indication

Expanded Name Asis.Type_Definitions.Component_Subtype_Indication

Returns the component-subtype indication of the specified constrained array-type definition.

Description

Constrained array-type 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

Constrained array-type definitions can also appear in object declarations. Object declarations are partially defined by the following syntax:

Ada83 LRM 3.2, Ada95 LRM 3.2
 object_declaration ::=
   identifier_list :
    [constant] subtype_indication
     [:= expression];
  | identifier_list :
    [constant] constrained_array_definition
     [:= expression];

This function returns the component-subtype indication for the specified constrained-array definition.

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

The returned element is of the following kind:
Element_Kinds

A_Subtype_Indication

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 Constraint_Kind

Expanded Name Asis.Type_Definitions.Constraint_Kind

Returns the kind of constraint represented by the specified Constraint parameter.

Description

Declaration constraints are defined by the following syntax:

Ada83 LRM 3.3.2, Ada95 LRM 3.2.2
 constraint ::=
   range_constraint
  | floating_point_constraint
  | fixed_point_constraint
  | index_constraint
  | discriminant_constraint

Range constraints are partially defined by the following syntax:

Ada83 LRM 3.5, Ada95 LRM 3.5
 range_constraint ::= range range

 range ::= range_attribute
  | simple_expressions .. simple_expression

Description (continued)

Floating and fixed-point range constraints are defined by the following syntax:

Ada83 LRM 3.5.7, Ada95 LRM 3.5.7
 floating_point_constraint ::=
  floating_accuracy_definition
    [range_constraint]

Ada83 LRM 3.5.9, Ada95 LRM 3.5.9
 fixed_point_constraint ::=
  fixed_accuracy_definition
    [range_constraint]

Index constraints are defined by the following syntax:

Ada83 LRM 3.6, Ada95 LRM 3.6
 index_constraint ::=
  (discrete_range {, discrete_range})

Discriminant constraints are defined by the following syntax:

Ada83 LRM 3.7.2, Ada95 LRM 3.7.1
 discriminant_constraint ::=
  (discriminant_association
   {, discriminant_association})

This function returns the kind of constraint represented by the specified Constraint parameter.

Parameters

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

A_Constraint

Returns the kind of the constraint represented by the Constraint parameter. If the Constraint parameter does not represent a constraint, Not_A_Constraint is returned.

Errors

None.

Examples

Cross-References

Related subprograms and types:

Related concepts:


Type Constraint_Kinds

Expanded Name Asis.Type_Definitions.Constraint_Kinds

Describes the kinds of constraints available.

Description

Declaration constraints are defined by the following syntax:

Ada83 LRM 3.3.2, Ada95 LRM 3.2.2
 constraint ::=
   range_constraint
  | floating_point_constraint
  | fixed_point_constraint
  | index_constraint
  | discriminant_constraint

The correlation of constraint kinds and the constraint syntax is shown in the below table:
Constraint
Constraint_Kinds
range_constraint
A_Simple_Range or A_Range-_Attribute
floating_point_constraint
A_Floating_Point_Constraint
fixed_point_constraint
A_Fixed_Point_Constraint
index_constraint
An_Index_Constraint
discriminant_constraint
A_Discriminant_Constraint

The value Not_A_Constraint indicates that the element does not represent a constraint.

Enumerations

Indicates that the element represents a discriminant constraint (Ada83 LRM 3.7.2, Ada95 LRM 3.7.1).

Indicates that the element represents a floating-point constraint (Ada83 LRM 3.5.7, Ada95 LRM 3.5.7).

Indicates that the element represents a fixed-point constraint (Ada83 LRM 3.5.9, Ada95 LRM 3.5.9).

Indicates that the element represents a range attribute (Ada83 LRM 3.5, Ada95 LRM 3.5).

Indicates that the element represents a simple range (Ada83 LRM 3.5, Ada95 LRM 3.5).

Indicates that the element represents an index constraint (Ada83 LRM 3.6, Ada95 LRM 3.6).

Indicates that the element is not a constraint.

Cross-References

Related subprogram:

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