![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Function Raised_Exception
function Raised_Exception (Statement : in Asis.Statement) return Asis.Expression;Expanded Name Asis.Statements.Raised_Exception
Returns the exception name from the specified raise statement.
Description
Raise statements are defined by the following syntax:
Ada83 LRM 11.3, Ada95 LRM 11.3
raise_statement ::= raise [exception_name];This function returns the exception name for the specified raise statement.
If the raise statement does not include an exception name, Asis.Nil_Element is returned.
Is_Name_Repeated
function Is_Name_Repeated (Statement : in Asis.Statement) return Boolean;Expanded Name Asis.Statements.Is_Name_Repeated
Returns True if the name of the loop or block is repeated after teh end of the statement. Returns False for all unexpected Element kinds.
Description
Element and Statement kinds are defined by the following syntax:
Expected Asis.Elements.Element_Kinds: A_Statement
Expected Asis.Statements.Statement_Kinds: An_Accept_Statement A_Block_Statement A_Loop_StatementParameters
Statement : in Asis.Statement;Specifies the exception statement that should be queried. The statement must be of the following kinds:
Element_Kinds Statement_Kinds
A_Statement A_Raise_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
- "Processing Exception Handlers and Raise Statements"
- package Expressions, "Processing Expressions"
- Ada83 LRM 11.3, Ada95 LRM 11.3
Function Return_Expression
function Return_Expression (Statement : in Asis.Statement) return Asis.Expression;Expanded Name Asis.Statements.Return_Expression
Returns the expression from the specified return statement.
Description
Return statements are defined by the following syntax:
Ada83 LRM 5.8, Ada95 LRM 5.8
return_statement ::= return [expression];This function returns the expression in the specified return
statement.If an expression does not exist, Asis.Nil_Element is returned.
Parameters
Statement : in Asis.Statement;Specifies the return statement that should be queried. The statement must be of the following kinds:
Element_Kinds Statement_Kinds
A_Statement A_Return_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 Return Statements"
- package Expressions, "Processing Expressions"
- Ada83 LRM 5.8, Ada95 LRM 5.8
Function Select_Alternative_Kind
function Select_Alternative_Kind (Alternative : in Asis.Select_Alternative) return Select_Alternative_Kinds;Expanded Name Asis.Statements.Select_Alternative_Kind
Returns the alternative kind for the specified selective-wait
alternative.Description
Selective-wait-statement select alternatives are defined by the following syntax:
Ada83 LRM 9.7.1, Ada95 LRM 9.7.1
select_alternative ::=
[when condition =>]
selective_wait_alternative
selective_wait_alternative ::=
accept_alternative
| delay_alternative
| terminate_alternativeThis function returns the selective-wait alternative kind for the specified selective-wait select alternative.
Parameters
Alternative : in Asis.Select_Alternative;Specifies the select-statement alternative that should be queried. The alternative must be of the following kind:
Element_Kinds
A_Select_Alternative
return Select_Alternative_Kinds;Returns the select alternative kind for all elements in the above table that are part of a selective wait and Not_A_Select_Alternative for all other 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 subprograms and types:
- function Arm_Select_Alternative
- function Else_Statements
- function Guard
- function Is_Guarded
- type Select_Alternative_Kinds
- function Select_Alternative_Statements
- function Select_Statement_Arm_Kind
- type Select_Statement_Arm_Kinds
- function Select_Statement_Arms
- "Processing Selective Waits"
- Ada83 LRM 9.7.1, Ada95 LRM 9.7.1
Type Select_Alternative_Kinds
type Select_Alternative_Kinds is (...);Expanded Name Asis.Statements.Select_Alternative_Kinds
Describes the selective-wait alternative kinds that are available.
Description
The Select_Alternative_Kinds type describes the select alternative that follows the reserved words select and or in a selective wait.
The kind is returned by the Select_Alternative_Kind function.
Enumerations
A_Delay_AlternativeIndicates that an element represents a delay statement optionally followed by a sequence of statements.
A_Terminate_AlternativeIndicates that an element represents a terminate alternative consisting solely of the reserved word terminate.
An_Accept_AlternativeIndicates that an element represents an accept statement optionally followed by a sequence of statements.
Not_A_Select_AlternativeIndicates that an element does not represent a selective-wait alternative.
Cross-References
- "Processing Selective Waits"
- Ada83 LRM 9.7, Ada95 LRM 9.7
Function Select_Alternative_Statements
function Select_Alternative_Statements (Alternative : in Asis.Select_Alternative; Include_Pragmas : in Boolean := False) return Asis.Statement_List;Expanded Name Asis.Statements.Select_Alternative_Statements
Returns a list of all statements and, optionally, pragmas present in the specified select-statement accept or delay alternative.
Description
Selective-wait-statement alternatives are partially defined by the following syntax:
Ada83 LRM 9.7.1, Ada95 LRM 9.7.1
selective_wait_alternative ::=
accept_alternative
| delay_alternative
| terminate_alternative
accept_alternative ::=
accept_statement
[sequence_of_statements]
delay_alternative ::=
delay_statement
[sequence_of_statements]This function returns the sequence of statements from the specified accept alternative or delay alternative. The returned list also includes the accept or delay statements.
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
Alternative : in Asis.Select_Alternative;Specifies the select-statement alternative that should be queried. The alternative must be of the following kinds:
Element_Kinds Select_Alternative_Kinds
A_Select_Alternative A_Delay_Alternative
A_Terminate_Alternative
An_Accept_Alternative
If the Select_Alternative_Kinds is A_Terminate_Alternative, Asis.Nil_Element is returned.
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
Related subprograms and types:
- function Arm_Select_Alternative
- function Else_Statements
- function Entry_Call_Statements
- function Select_Alternative_Kind
- type Select_Alternative_Kinds
- function Select_Alternative_Statements
- function Select_Statement_Arm_Kind
- type Select_Statement_Arm_Kinds
- function Select_Statement_Arms
- function Timed_Entry_Call_Or_Statements
Function Select_Statement_Arm_Kind
function Select_Statement_Arm_Kind (Arm : in Asis.Select_Statement_Arm) return Select_Statement_Arm_Kinds;Expanded Name Asis.Statements.Select_Statement_Arm_Kind
Returns the kind of arm for the specified select statement.
Description
Select-statement processing is based on the concept of arms. An arm is one of:
- The select alternative following the reserved words select or or in a selective wait
- The entry-call statement and optional sequence of statements in a conditional entry call or timed entry call
- The sequence of statements following the reserved word else in the selective wait or conditional entry call
- The delay alternative following the reserved word or in a timed entry call
This function returns the kind of select statement arm specified by Arm.
Parameters
Arm : in Asis.Select_Statement_Arm;Specifies the select-statement arm that should be queried. The arm must be of the following kind:
Element_Kinds
A_Select_Statement_Arm
return Select_Statement_Arm_Kinds;Returns the kind of select-statement arm for all elements in the above table and Not_A_Select_Statement_Arm for all other elements.
Errors
Examples
Cross-References
Type Select_Statement_Arm_Kinds
type Select_Statement_Arm_Kinds is (...);Expanded Name Asis.Statements.Select_Statement_Arm_Kinds
Describes the kinds of select-statement arms that are available.
Description
Select-statement processing is based on the concept of arms. An arm is one of:
- The select alternative following the reserved words select or or in a selective wait
- The entry-call statement and optional sequence of statements in a conditional entry call or timed entry call
- The sequence of statements following the reserved word else in the selective wait or conditional entry call
- The delay alternative following the reserved word or in a timed entry call
This type describes the names for the arms.
The arm kinds are returned by the Select_Statement_Arm_Kind function.
Enumerations
A_Conditional_Entry_Call_Else_ArmIdentifies the sequence of statements that follows the else reserved word in a conditional entry call.
A_Conditional_Entry_Call_Select_ArmIdentifies the sequence of statements that follows the select reserved word in a conditional entry-call select statement.
A_Selective_Wait_Else_ArmIdentifies the sequence of statements that follows the else reserved word in a selective wait.
A_Selective_Wait_Or_ArmIdentifies the sequence of statements that follows the or reserved word in a selective wait.
A_Selective_Wait_Select_ArmIdentifies the sequence of statements that follows the select reserved word in a selective wait.
A_Timed_Entry_Call_Or_ArmIdentifies the sequence of statements that follows the or reserved word in a timed entry call.
A_Timed_Entry_Call_Select_ArmIdentifies the sequence of statements that follows the select reserved word in a timed entry call.
Cross-References
Function Select_Statement_Arms
function Select_Statement_Arms (Statement : in Asis.Statement) return Asis.Select_Statement_Arm_List;Expanded Name Asis.Statements.Select_Statement_Arms
Returns a list of the ams in the specified select statement.
Description
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;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;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 a list containing the arms that constitute the specified selective wait, conditional entry call, or timed entry-call statement.
The kinds of arms returned depend on the kind of select statement specified:
The arms are returned in their order of appearance in the source code.
Parameters
Statement : in Asis.Statement;Specifies the select statement that should be queried. The statement must be of the following kinds:
Element_Kinds Statement_Kinds
A_Statement A_Condition_Entry_Call_Statement
A_Selective_Wait_Statement
A_Timed_Entry_Call_Statement
return Asis.Select_Statement_Arm_List;The returned list contains elements of the following kind
Element_Kinds
A_Select_Arm
:
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_Select_Alternative
- function Else_Statements
- function Entry_Call_Statements
- function Select_Alternative_Kind
- type Select_Alternative_Kinds
- function Select_Alternative_Statements
- function Select_Statement_Arm_Kind
- type Select_Statement_Arm_Kinds
- function Timed_Entry_Call_Or_Statements
- "Processing Select Statements"
- "Processing Selective Waits"
- "Processing Timed Entry Calls"
- Ada83 LRM 9.7.1, Ada95 LRM 9.7.1
- Ada83 LRM 9.7.2, Ada95 LRM 9.7.3
- Ada83 LRM 9.7.3, Ada95 LRM 9.7.2
Type Statement_Kinds
type Statement_Kinds is (...);Expanded Name Asis.Statements.Statement_Kinds
Describes the statement kinds that are available.
Description
The statement kind can be obtained with the Kind function.
Enumerations
The correlation between the enumeration values and the Ada statements they represent is presented in the table below:
Cross-References
Function Timed_Entry_Call_Or_Statements
function Timed_Entry_Call_Or_Statements (Arm : in Asis.Select_Statement_Arm; Include_Pragmas : in Boolean := False) return Asis.Statement_List;Expanded Name Asis.Statements.Timed_Entry_Call_Or_Statements
Returns a list of all statements and, optionally, pragmas present in the specified or arm of the timed-entry-call select statement.
Description
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 delay alternative of the specified 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-statement arm that should be queried. The arm must be of the following kinds:
Element_Kinds Select_Statement_Arm_Kinds
A_Select_Statement_Arm A_Timed_Entry_Call_Or_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
Related subprograms and types:
- 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
Function While_Condition
function While_Condition (Statement : in Asis.Statement) return Asis.Expression;Expanded Name Asis.Statements.While_Condition
Returns the expression from the specified while statement.
Description
Loop statements are partially defined by the following syntax:
loop_statement ::=
[loop_simple_name:]
[iteration_scheme] loop
sequence_of_statements
end loop [loop_simple_name];
iteration_scheme ::= while condition
| for loop_parameter_specificationThis function returns the condition of the iteration scheme for the specified loop statement.
Parameters
Statement : in Asis.Statement;Specifies the while statement that should be queried. The statement must be of the following kinds:
Element_Kinds Loop_Kinds
A_Loop_Statement A_While_Loop
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 For_Loop_Parameter_Specification
- function Is_Reverse_Loop_Parameter
- function Loop_Kind
- type Loop_Kinds
- function Loop_Parameter_Range
- function Loop_Simple_Name
- function Loop_Statements
- "Processing Loop Statements"
- package Expressions, "Processing Expressions"
- Ada83 LRM 5.5, Ada95 LRM 5.5
Package Operations
package Operations is -- For Statement_Kinds function "=" (Left, Right : ... -- For If_Statement_Arm_Kinds function "=" (Left, Right : ... -- For Loop_Kinds function "=" (Left, Right : ... -- For Select_Statement_Arm_Kinds function "=" (Left, Right : ... -- For Select_Alternative_Kinds function "=" (Left, Right : ...end Operations;Expanded Name Asis.Statements.Operations
Package Operations proides a simple way to obtain visibility to operators for types used in package Statements. The package typically is referenced in a use clause by an application.
Cross-References
Rational Software Corporation
http://www.rational.com support@rational.com techpubs@rational.com Copyright © 1993-2001, Rational Software Corporation. All rights reserved. |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |