TOC PREV NEXT INDEX DOC LIST MASTER INDEX




Function Condition_Expression

Expanded Name Asis.Statements.Condition_Expression

Returns the condition expression for the specified if-statement arm.

Description

If statements are defined by the following syntax:

Ada83 LRM 5.3, Ada95 LRM 5.3
 if_statement ::=
  if condition then
   sequence_of_statements
  {elsif condition then
   sequence_of_statements}
  [else
   sequence_of_statements]
  end if;

This function returns the condition expression for the specified arm of an if statement.

Parameters

Specifies the if-statement arm that should be queried. The arm must be of the following kinds:
Element_Kinds
If_Statement_Arm_Kinds
An_If_Statement_Arm
An_Elsif_Arm
An_If_Arm

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

Related concepts:


Function Declarative_Items

Expanded Name Asis.Statements.Declarative_Items

Returns a list of declarative items 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 declarative part of the specified block statement.

The declarative part includes declarations, representation specifications, pragmas, and use clauses.

If a declarative part does not exist, Asis.Nil_Element_List is returned.

The declarative items 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_Declaration
Declarations.
(most subprograms)

A_Pragma
Elements.
Argument_Associations
Is_Predefined
Name
Pragma_Kind

A_Representation_Clause
Representation_Clauses.
Associated_Type
Kind
Length_Clause_Attribute
Length_Clause_Attribute_Kind

A_Use_Clause
Expressions.
Named_Packages

Parameters

Specifies the block statement that should be queried. The statement must be of the following kinds:
Element_Kinds
Statement_Kinds
A_Statement
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_Declaration
A_Pragma

A_Representation_Clause
A_Use_Clause

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 Delay_Expression

Expanded Name Asis.Statements.Delay_Expression

Returns the expression representing the delay duration in the specified delay statement.

Description

Delay statements are defined by the following syntax:

Ada83 LRM 9.6, Ada95 LRM 9.6
 delay_statement ::= delay simple_expression;

This function returns the simple expression for the specified delay statement.

Parameters

Specifies the delay statement that should be queried. The statement must be of the following kinds:
Element_Kinds
Statement_Kinds
A_Statement
A_Delay_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 concepts:


Function Destination_Statement

Expanded Name Asis.Statements.Destination_Statement

Returns the element that represents the destination for the specified goto statement.

Description

Goto statements are defined by the following syntax:

Ada83 LRM 5.9, Ada95 LRM 5.8
 goto_statement ::= goto label_name;

This function returns an element that represents the target statement for the specified goto statement.

Parameters

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

The returned element is of the following kind:
Element_Kinds

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

Related concepts:


Function Else_Statements

Returns a list of all statements and, optionally, pragmas present in the specified else portion of a selective-wait or conditional entry-call select statement.

Description

Selective-wait select statements are partially defined by the following syntax:

Ada83 LRM 9.7.1, Ada95 LRM 9.7.1 

selective_wait ::=
  select
   select_alternative
  {or
   select_alternative}
  [else
   sequence_of_statements]
  end select;

Conditional entry-call select statements are defined by the following syntax:

Ada83 LRM 9.7.2, Ada95 LRM 9.7.3

 conditional_entry_call :=
  select
   entry_call_statement
   [sequence_of_statements]
  else
   sequence_of_statements
  end select;

This function returns the sequence of statements in the specified else arm of a selective wait or conditional entry call.

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 select arm that should be queried. The arm must be of the following kinds:
Element_Kinds
Select_Statement_Arm_Kinds
A_Select_Statement_Arm
A_Conditional_Entry_Call_Else_Arm
A_Selective_Wait_Else_Arm

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 Entry_Call_Statements

Expanded Name Asis.Statements.Entry_Call_Statements

Returns a list of all statements and, optionally, pragmas present in the specified arm of a condition entry-call or timed entry-call select statement.

Description

Conditional entry-call select statements are defined by the following syntax:

Ada83 LRM 9.7.2, Ada95 LRM 9.7.3 

conditional_entry_call :=
  select
   entry_call_statement
   [sequence_of_statements]
  else
   sequence_of_statements
  end select;

Timed entry-call select statements are defined by the following syntax:

Ada83 LRM 9.7.3, Ada95 LRM 9.7.2 

timed_entry_call ::=
  select
   entry_call_statement
   [sequence_of_statements]
  or
   delay_alternative
  end select;

This function returns the entry-call statement and the following sequence of statements for the specified conditional entry call or timed entry call.

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 select arm that should be queried. The arm must be of the following kinds:
Element_Kinds
Select_Statement_Arm_Kinds
A_Select_Statement_Arm
A_Conditional_Entry_Call_Select_Arm
A_Timed_Entry_Call_Select_Arm

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 Exception_Choices

Expanded Name Asis.Statements.Exception_Choices

Returns a list of the choices contained in the specified arm of an exception handler.

Description

Exception handlers are defined by the following syntax:

Ada83 LRM 11.2, Ada95 LRM 11.2

 exception_handler ::=
  when exception_choice {| exception_choice} =>
   sequence_of_statements

 exception_choice ::= exception_name | others

This function returns a list of exception choices that appear in the specified exception handler.

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 list that is returned.

Parameters

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

An_Exception_Handler

The returned list contains elements of the following kind
Element_Kinds
Choice_Kinds
A_Choice
An_Exception_Name
An_Expression
An_Others_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 Exit_Condition

Expanded Name Asis.Statements.Exit_Condition

Returns the exit-condition expression for the specified exit
statement.

Description

Exit statements are defined by the following syntax

Ada83 LRM 5.7, Ada95 LRM 5.7 

exit_statement ::=
  exit [loop_name] [when condition];

This function returns the condition for the specified exit
statement.

If an exit condition does not exist, Asis.Nil_Element is returned.

Parameters

Specifies the exit statement that should be queried. The statement must be of the following kinds:
Element_Kinds
Statement_Kinds
A_Statement
An_Exit_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 Exit_Loop_Name

Expanded Name Asis.Statements.Exit_Loop_Name

Returns the name of the loop exited by the specified statement.

Description

Exit statements are defined by the following syntax

Ada83 LRM 5.7, Ada95 LRM 5.7 

exit_statement ::=
  exit [loop_name] [when condition];

This function returns the loop name for the specified exit
statement.

If a loop name does not exist, Asis.Nil_Element is returned.

Parameters

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

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:


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