TOC PREV NEXT INDEX DOC LIST MASTER INDEX




Function Block_Body_Statements

Expanded Name Asis.Statements.Block_Body_Statements

Returns a list of all statements and, optionally, pragmas present in the specified block statement.

Description

Block statements are defined by the following syntax:

Ada83 LRM 5.6, Ada95 LRM 5.6 
block_statement ::=
  [block_simple_name:]
   [declare
    declarative_part]
   begin
    sequence_of_statements
   [exception
    exception_handler
    {exception_handler}]
   end [block_simple_name];

This function returns the sequence_of_statements for the specified block statement.

Statements and pragmas are returned in their order of appearance in the source code. A_Pragma elements do not appear in the list unless Include_Pragmas has been specified as True.

For further analysis:
Element_Kinds
Calls to Use
A_Pragma
Elements.
Argument_Associations
Is_Predefined
Name
Pragma_Kind

A_Statement
Statements.
(most subprograms)

Parameters

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

A_Block_Statement

Specifies whether pragma definitions should be included in the returned list.

The returned list contains elements of the following kinds:
Element_Kinds

A_Pragma

A_Statement

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 Block_Exception_Handlers

Expanded Name Asis.Statements.Block_Exception_Handlers

Returns a list of exception handlers in the specified block
statement.

Description

Block statements are defined by the following syntax:

Ada83 LRM 5.6, Ada95 LRM 5.6
 block_statement ::=
  [block_simple_name:]
   [declare
    declarative_part]
   begin
    sequence_of_statements
   [exception
    exception_handler
    {exception_handler}]
   end [block_simple_name];

This function returns a list of the exception handlers for the specified block statement.

The exception handlers are returned in their order of appearance in the source code.

If no exception handlers are defined, Asis.Nil_Element_List is returned.

Parameters

Specifies the statement that should be queried. The statement must be of the following kinds:
Element_Kinds
Statement_Kinds
A_Statement
A_Block_Statement

The returned list contains elements of the following kind
Element_Kinds

An_Exception_Handler

:

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 Block_Simple_Name

Expanded Name Asis.Statements.Block_Simple_Name

Returns the name of the specified block.

Description

Block statements are defined by the following syntax:

Ada83 LRM 5.6, Ada95 LRM 5.6
 block_statement ::=
  [block_simple_name:]
   [declare
    declarative_part]
   begin
    sequence_of_statements
   [exception
    exception_handler
    {exception_handler}]
   end [block_simple_name];

This function returns the block simple name for the specified block statement.

If the block simple name does not exist, Asis.Nil_Element is returned.

The Elements.Enclosing_Element of the name definition is the block statement.

Parameters

Specifies the statement that should be queried. The statement must be of the following kinds:
Element_Kinds
Statement_Kinds
A_Statement
A_Block_Statement

The returned element is of the following kind:
Element_Kinds

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 Call_Parameters

Expanded Name Asis.Statements.Call_Parameters

Returns a list containing all parameter associations present in the specified procedure- or entry-call statement.

Description

Procedure- and entry-call statements are partially defined by the following syntax:

Ada83 LRM 6.4, Ada95 LRM 6.4

 procedure_call_statement ::=
  procedure_name [actual_parameter_part];

Ada83 LRM 9.5, Ada95 LRM 9.5

 entry_call_statement ::=
  entry_name [actual_parameter_part];

The actual parameter part of each statement is partially defined by the following syntax:

Ada83 LRM 6.4, Ada95 LRM 6.4

 actual_parameter_part ::=
  (parameter_association
   {, parameter_association})

 parameter_association ::=
  [formal_parameter =>] actual_parameter

This function returns a list containing the parameter associations for the specified procedure-call statement or entry-call
statement.

Each parameter association references an actual parameter. You can obtain the element representing the actual parameter with the Actual_Parameter function. If named notation is used, each parameter association also references a formal parameter. You can obtain the formal parameter with the Formal_Parameter function.

Description (continued)

An ASIS implementation may choose to always normalize parameter lists and include defaulted parameters in the parameter list. If parameter lists are always normalized, this function behaves as if the Normalized parameter has been specified as True.

If a list is unnormalized:

If a list is normalized:

For more information on parameter names, defaulted parameters, and list normalization, see package Environment, "Default Parameter Processing" and "Normalization of Parameter Lists"; the Environment.Call_Parameters_Include_Defaults function; and the Environment.Call_Parameters_Normalized function.

Parameters

Specifies the statement that should be queried. The statement must be of the following kinds:
Element_Kinds
Statement_Kinds
A_Statement
A_Procedure_Call_Statement
An_Entry_Call_Statement

Specifies whether the parameter list should contain normalized or unnormalized associations.

The returned list contains elements of the following kind
Element_Kinds

A_Parameter_Association
:

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 Called_Name

Expanded Name Asis.Statements.Called_Name

Returns the name of the called procedure or entry for the specified statement.

Description

Procedure- and entry-call statements are defined by the following syntax:

Ada83 LRM 6.4, Ada95 LRM 6.4

 procedure_call_statement ::=
  procedure_name [actual_parameter_part];

Ada83 LRM 9.5, Ada95 LRM 9.5 

entry_call_statement ::=
  entry_name [actual_parameter_part];

This function returns the procedure name or entry name for the specified procedure-call statement or entry-call statement.

Parameters

Specifies the statement that should be queried. The statement must be of the following kinds:
Element_Kinds
Statement_Kinds
A_Statement
A_Procedure_Call_Statement
An_Entry_Call_Statement

The returned element is of the following kinds:
Element_Kinds
Expression_Kinds
An_Expression
A_Selected_Component (if an entry family exists)
A_Simple_Name
An_Indexed_Component

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 Called_Procedure

Expanded Name Asis.Statements.Called_Procedure

Returns the specification of the procedure or the declaration of the entry called by the specified statement.

Description

Procedure- and entry-call statements are partially defined by the following syntax:

Ada83 LRM 6.4, Ada95 LRM 6.4 

procedure_call_statement ::=
  procedure_name [actual_parameter_part];

Ada83 LRM 9.5, Ada95 LRM 9.5 

entry_call_statement ::=
  entry_name [actual_parameter_part];

The declarations for procedures and entries are partially defined by the following syntax:

Ada83 LRM 6.1, Ada95 LRM 6.1

 subprogram_specification ::=
   procedure identifier [formal_part]
  | function designator [formal_part]
    return type_mark

This function returns the subprogram specification if the specified statement is a procedure-call statement or the entry declaration if the specified statement is an entry-call statement.

Parameters

Specifies the statement that should be queried. The statement must be of the following kinds:
Element_Kinds
Statement_Kinds
A_Statement
A_Procedure_Call_Statement
An_Entry_Call_Statement

The returned element is of the following kind:
Element_Kinds
Declaration_Kinds
A_Declaration
A_Procedure_Body_Declaration
A_Procedure_Declaration
A_Procedure_Instantiation
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 Obsolete_Reference_Error if a parameter is part of an obsolete compilation unit.

Examples

Cross-References

Related subprograms:

Related concepts:


Function Case_Expression

Expanded Name Asis.Statements.Case_Expression

Returns the expression that determines which alternative will be taken for the specified case statement.

Description

Case statements are partially defined by the following syntax:

Ada83 LRM 5.4, Ada95 LRM 5.4 

case_statement ::=
  case expression is
   case_statement_alternative
   {case_statement_alternative}
  end case;

This function returns the expression for the specified case
statement.

Parameters

Specifies the statement that should be queried. The statement must be of the following kinds:
Element_Kinds
Statement_Kinds
A_Statement
A_Case_Statement

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 Case_Statement_Alternative_Choices

Expanded Name Asis.Statements.Case_Statement_Alternative_Choices

Returns a list of the choices defined for the specified case-statement alternative.

Description

Case-statement alternatives are partially defined by the following syntax:

Ada83 LRM 5.4, Ada95 LRM 5.4

case_statement_alternative ::=
  when choice {| choice } =>
   sequence_of_statements

This function returns a list of the choices for the specified case-statement alternative.

The choices are returned in their order of appearance in the source code.

Package Type_Definitions contains functions that can be used to decompose the choices returned.

Parameters

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

A_Case_Statement_Alternative

The returned list contains elements of the following kind
Element_Kinds

A_Choice

:

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 Case_Statement_Alternative_Statements

Expanded Name Asis.Statements.Case_Statement_Alternative_Statements

Returns a list of all statements and, optionally, pragmas present in the specified case-statement alternative.

Description

Case-statement alternatives are partially defined by the following syntax:

Ada83 LRM 5.4, Ada95 LRM 5.4 

case_statement_alternative ::=
  when choice {| choice } =>
   sequence_of_statements

This function returns the sequence of statements for the specified case-statement alternative.

Statements and pragmas are returned in their order of appearance in the source code. A_Pragma elements do not appear in the list unless Include_Pragmas has been specified as True.

For further analysis:
Element_Kinds
Calls to Use
A_Pragma
Elements.
Argument_Associations
Is_Predefined
Name
Pragma_Kind

A_Statement
Statements.
(most subprograms)

Parameters

Specifies the case-statement alternative that should be queried. The alternative must be of the following kind:
Element_Kinds

A_Case_Statement_Alternative

Specifies whether pragma definitions should be included in the returned list.

The returned list contains elements of the following kinds:
Element_Kinds

A_Pragma

A_Statement

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 Case_Statement_Alternatives

Expanded Name Asis.Statements.Case_Statement_Alternatives

Returns a list of the alternatives for the specified case statement.

Description

Case statements are partially defined by the following syntax:

Ada83 LRM 5.4, Ada95 LRM 5.4

 case_statement ::=
  case expression is
   case_statement_alternative
   {case_statement_alternative}
  end case;

This function returns a list of the case-statement alternatives for the specified case statement.

The alternatives are returned in their order of appearance in the source code.

Parameters

Specifies the case statement that should be queried. The statement must be of the following kinds:
Element_Kinds
Statement_Kinds
A_Statement
A_Case_Statement_Alternative

The returned list contains elements of the following kinds
Element_Kinds

A_Case_Statement_Alternative
:

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