![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Function Condition_Expression
function Condition_Expression (Arm : in Asis.If_Statement_Arm) return Asis.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
Arm : in Asis.If_Statement_Arm;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
return Asis.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 and types:
- function Arm_Statements
- function If_Statement_Arm_Kind
- type If_Statement_Arm_Kinds
- function If_Statement_Arms
- "Processing If Statements"
- package Expressions, "Processing Expressions"
- Ada83 LRM 5.3, Ada95 LRM 5.3
Function Declarative_Items
function Declarative_Items (Statement : in Asis.Statement; Include_Pragmas : in Boolean := False) return Asis.Declarative_Item_List;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.
Parameters
Statement : in Asis.Statement;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
Include_Pragmas : in Boolean := False;Specifies whether pragma definitions should be included in the returned list.
return Asis.Declarative_Item_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
- "Processing Block Statements"
- Ada83 LRM 5.6, Ada95 LRM 5.6
Function Delay_Expression
function Delay_Expression (Statement : in Asis.Statement) return Asis.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
Statement : in Asis.Statement;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
return Asis.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
- "Processing Delay Statements"
- package Expressions, "Processing Expressions"
- Ada83 LRM 9.6, Ada95 LRM 9.6
Function Destination_Statement
function Destination_Statement (Statement : in Asis.Statement) return Asis.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
Statement : in Asis.Statement;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
return Asis.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
- "Processing Goto Statements"
- Ada83 LRM 5.9, Ada95 LRM 5.8
Function Else_Statements
function Else_Statements (Arm : in Asis.Select_Statement_Arm; Include_Pragmas : in Boolean := False) return Asis.Statement_List;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.
Element_Kinds Calls to Use
A_Pragma Elements.
Argument_Associations
Is_Predefined
Name
Pragma_Kind
A_Statement Statements.
(most subprograms)
Parameters
Arm : in Asis.Select_Statement_Arm;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
Include_Pragmas : in Boolean := False;Specifies whether pragma definitions should be included in the returned list.
return Asis.Statement_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
- function Arm_Select_Alternative
- function Entry_Call_Statements
- function Select_Alternative_Kind
- function Select_Alternative_Statements
- function Select_Statement_Arm_Kind
- type Select_Statement_Arm_Kinds
- function Select_Statement_Arms
- "Processing Conditional Entry Calls"
- "Processing Select Statements"
- "Processing Selective Waits"
- Ada83 LRM 9.7.1, Ada95 LRM 9.7.1
- Ada83 LRM 9.7.2, Ada95 LRM 9.7.3
Function Entry_Call_Statements
function Entry_Call_Statements (Arm : in Asis.Select_Statement_Arm; Include_Pragmas : in Boolean := False) return Asis.Statement_List;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.
Element_Kinds Calls to Use
A_Pragma Elements.
Argument_Associations
Is_Predefined
Name
Pragma_Kind
A_Statement Statements.
(most subprograms)
Parameters
Arm : in Asis.Select_Statement_Arm;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
Include_Pragmas : in Boolean := False;Specifies whether pragma definitions should be included in the returned list.
return Asis.Statement_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
- function Else_Statements
- function Entry_Call_Statements
- function Select_Alternative_Statements
- function Select_Statement_Arm_Kind
- type Select_Statement_Arm_Kinds
- function Select_Statement_Arms
- function Timed_Entry_Call_Or_Statements
- "Processing Conditional Entry Calls"
- "Processing Select Statements"
- "Processing Timed Entry Calls"
- Ada83 LRM 9.7.2, Ada95 LRM 9.7.3
Function Exception_Choices
function Exception_Choices (Handler : in Asis.Exception_Handler) return Asis.Choice_List;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 | othersThis 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
Handler : in Asis.Exception_Handler;Specifies the exception handler that should be queried. The handler must be of the following kind:
Element_Kinds
An_Exception_Handler
return Asis.Choice_List;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
- function Handler_Statements
- function Is_Others_Handler
- function Raised_Exception
- function Type_Definitions.Choice_Kind
- "Processing Exception Handlers and Raise Statements"
- package Type_Definitions, "Processing Choices"
- Ada83 LRM 11.2, Ada95 LRM 11.2
Function Exit_Condition
function Exit_Condition (Statement : in Asis.Statement) return Asis.Expression;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
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
Statement : in Asis.Statement;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
return Asis.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
- "Processing Exit Statements"
- package Expressions, "Processing Expressions"
- Ada83 LRM 5.7, Ada95 LRM 5.7
Function Exit_Loop_Name
function Exit_Loop_Name (Statement : in Asis.Statement) return Asis.Expression;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
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
Statement : in Asis.Statement;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
return Asis.Expression;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
Rational Software Corporation
http://www.rational.com support@rational.com techpubs@rational.com Copyright © 1993-2001, Rational Software Corporation. All rights reserved. |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |