TOC PREV NEXT INDEX DOC LIST MASTER INDEX




Function Qualified_Object_Expression

Expanded Name Asis.Expressions.Qualified_Object_Expression

Returns the qualified expression from the specified allocator expression.

Description

Allocators are defined by the following syntax:

Ada83 LRM 4.8, Ada95 LRM 4.8

 allocator ::=
  new subtype_indication
   | new qualified_expression

This function returns the qualified expression from the specified allocator.

Parameters

Specifies the allocator expression that should be queried. The expression must be of the following kinds:
Element_Kinds
Expression_Kinds
An_Expression
An_Allocation_From_Qualified_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 concepts:


Function References

Expanded Name Asis.Expressions.References

Returns a list containing all direct references to the specified entity in the specified context.

Description

If the Name parameter represents An_Entity_Name_Definition, the search is made with the corresponding simple name or operator symbol.

If the Name parameter represents An_Expression, the search is performed with the corresponding Name_Definition function.

The Context parameter can be any Element_Kinds such as A_Choice or A_Type_Definition but typically will be A_Statement, particularly a block statement, or A_Declaration, typically of a library or secondary unit.

The references are returned in their left-to-right and top-to-bottom order of appearance in the source code.

Parameters

Specifies the entity that should be queried. The name must be of the following kinds:
Element_Kinds
Expression_Kinds
An_Entity_Name_Definition
A_Character_Literal
A_Simple_Name
An_Enumeration_Literal
An_Operator_Symbol

An_Expression
A_Character_Literal
A_Simple_Name
An_Enumeration_Literal
An_Operator_Symbol

Specifies the context for the query.

The returned list contains elements of the following kinds:
Element_Kinds
Expression_Kinds
An_Expression
A_Character_Literal
A_Simple_Name
An_Enumeration_Literal
An_Operator_Symbol

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 Obsolete_Reference_Error if a parameter is part of an obsolete compilation unit.

Examples

Cross-References

Related subprograms:

Related concept:


Function Representation_Value_Image

Expanded Name Asis.Expressions.Representation_Value_Image

Returns the text image of the internal code, as assigned with an enumeration representation specification (Ada83 LRM 13.3, Ada95 LRM 13.4), of the specified character or enumeration literal.

Description

Representation clauses can be inherited by derived types (Ada83 LRM 3.4, Ada95 LRM 3.4). Thus, the specified character or enumeration literal may have an assigned internal code but may not have an explicit enumeration representation clause.

You can determine whether an enumeration representation clause has been specified or inherited by calling Expression_Type to return the type definition of the character or enumeration literal and then calling Representation_Clauses.Associated_Enumeration_Type_Representation to obtain the clause.

If an enumeration representation specification has not been specified and has not been inherited, this function returns the same image as the 'Pos attribute returns when provided with the character or enumeration value (Ada83 LRM 3.3.5, Ada95 LRM 3.2).

Parameters

Specifies the character or enumeration literal that should be queried. The expression must be of the following kinds:
Element_Kinds
Expression_Kinds
An_Entity_Name_Definition
A_Character_Literal
An_Enumeration_Literal

An_Expression
A_Character_Literal
An_Enumeration_Literal

Returns the text image of the internal code, as assigned with an enumeration representation specification (Ada83 LRM 13.3, Ada95 LRM 13.4), of the specified character or enumeration literal.

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 Obsolete_Reference_Error if a parameter is part of an obsolete compilation unit.

Examples

Cross-References

Related subprograms:

Related concepts:


Function Selected_Component

Expanded Name Asis.Expressions.Selected_Component

Returns the declaration of the discriminant specification or component declaration for the specified selected component expression.

Description

Selected components are defined by the following syntax:

Ada83 LRM 4.1.3, Ada95 LRM 4.1.3

 selected_component ::= prefix.selector

 selector ::= simple_name
  | character_literal
  | operator_symbol
  | all

This function returns the declaration of the discriminant specification or component declaration associated with the simple name of the specified selected component.

You can call functions in package Declarations to analyze the returned declaration. In particular, you can call Object_Declara-tion_Definition to return the for-subtype declaration of a component declaration and Type_Mark to return the type mark of a discriminant specification.

Parameters

Specifies the selection that should be queried. The expression must be of the following kinds:
Element_Kinds
Expression_Kinds
Selection_Kinds
An_Expression
A_Selected-
_Component

A_Discriminant
A_Record-_Component

The returned element is of the following kinds:
Element_Kinds
Declaration_Kinds
A_Declaration
A_Component_Declaration
A_Discriminant_Specification

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 Obsolete_Reference_Error if a parameter is part of an obsolete compilation unit.

Examples

Cross-References

Related subprograms:

Related concepts:


Function Selected_Designated_Subtype

Expanded Name Asis.Expressions.Selected_Designated_Subtype

Returns the declaration of the type corresponding to the specified access-object expression.

Description

Selected components are defined by the following syntax:

Ada83 LRM 4.1.3, Ada95 LRM 4.1.3

 selected_component ::= prefix.selector

 selector ::= simple_name
  | character_literal
  | operator_symbol
  | all

This function returns the declaration of the subtype or, in the absence of a subtype, the type corresponding to the specified access-object expression (indicated by the reserved word all).

Parameters

Specifies the access selection that should be queried. The expression must be of the following kinds:
Element_Kinds
Expression_Kinds
Selection_Kinds
An_Expression
A_Selected-
_Component

An_Expanded
_Name
1
1 That designates a type or subtype.

The returned element is of the following kind:
Element_Kinds

A_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.

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 Selected_Task_Entry

Expanded Name Asis.Expressions.Selected_Task_Entry

Returns the entry declaration corresponding to the specified selected-component expression.

Description

Selected components are defined by the following syntax:

Ada83 LRM 4.1.3, Ada95 LRM 4.1.3 

selected_component ::= prefix.selector

 selector ::= simple_name
  | character_literal
  | operator_symbol
  | all

This function returns the declaration of the entry corresponding to the simple name of the specified selected component.

Parameters

Specifies the entry selection that should be queried. The expression must be of the following kinds:
Element_Kinds
Expression_Kinds
Selection_Kinds
An_Expression
A_Selected-
_Component

A_Task_Entry

The returned element is of the following kinds:
Element_Kinds
Declaration_Kinds
A_Declaration
An_Entry_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.

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 Selection_Kind

Expanded Name Asis.Expressions.Selection_Kind

Returns the selection kind of the specified selected-component expression.

Description

Selected components are defined by the following syntax:

Ada83 LRM 4.1.3, Ada95 LRM 4.1.3

 selected_component ::= prefix.selector

This function returns the kind of selector used in the specified selected component.

Parameters

Specifies the selection that should be queried. The expression must be of the following kinds:
Element_Kinds
Expression_Kinds
An_Expression
A_Selected_Component

Returns the selection kind for all elements in the above table or Not_A_Selection for any unexpected elements.

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:


Type Selection_Kinds

Expanded Name Asis.Expressions.Selection_Kinds

Describes the kinds of selectors that are available.

Description

Selected components are used to denote record discriminants and components, entries and entry families, and objects designated by access values (Ada83 LRM 4.1.3, Ada95 LRM 4.1.3). This type describes the selector kinds that are available.

Enumerations

Indicates that the element represents a simple name denoting the discriminant of an object or value.

Indicates that the element represents a simple name denoting a component of a record object or value.

Indicates that the element represents a single entry or an entry family of a task.

Indicates that the element represents the reserved word all.

Indicates that the element represents an expanded name. An expanded name is a simple name, a character literal, or an operator symbol.

Indicates that the element does not represent a selection.

Cross-References

Related subprogram:

Related concepts:


Function Selector

Expanded Name Asis.Expressions.Selector

Returns the selector from the specified selected-component expression.

Description

Selected components are defined by the following syntax:

Ada83 LRM 4.1.3, Ada95 LRM 4.1.3

 selected_component ::= prefix.selector

 selector ::= simple_name
  | character_literal
  | operator_symbol
  | all

This function returns the selector of the specified selected component for all selectors except an access object (designated by the reserved word all).

If the selected component contains multiple dots, this function returns the construct to the right of the rightmost dot.

Parameters

Specifies the component selection that should be queried. The expression must be of the following kinds:
Element_Kinds
Expression_Kinds
Selection_Kinds
An_Expression
A_Selected-
_Component

A_Discriminant
A_Record-_Component
A_Task_Entry
An_Expanded-_Name

The returned element is of the following kinds:
Element_Kinds
Expression_Kinds
An_Expression
A_Character_Literal
A_Simple_Name
An_Enumeration_Literal
An_Operator_Symbol

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 Selection_Kind of the expression is An_Access_Object or Not_A_Selection.

Examples

Cross-References

Related subprograms:

Related concepts:


Function Short_Circuit_Operation_Right-_Hand_Side

Expanded Name Asis.Expressions.Short_Circuit_Operation_Right-_Hand_Side

Returns the value on the right side for the specified short-circuit control-form expression.

Description

Expressions are defined by the following syntax:

Ada83 LRM 4.4, Ada95 LRM 4.4

 expression ::=
   relation {and relation}
  | relation {and then relation}
  | relation {or relation}
  | relation {[or else relation}
  | relation {xor relation}

This function returns the relation for the specified expression.

Parameters

Specifies the special operation that should be queried. The expression must be of the following kinds:
Element_Kinds
Expression_Kinds
Special_
Operation_
Kinds

An_Expression
A_Special_Operation
An_And_Then
An_Or_Else

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:


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