![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Function Is_Guarded
function Is_Guarded (Alternative : in Asis.Select_Alternative) return Boolean;Expanded Name Asis.Statements.Is_Guarded
Returns a Boolean value indicating whether the specified
selective-wait select-statement alternative arm includes a guard condition.Description
Selective-wait statement select alternatives are partially defined by the following syntax:
Ada83 LRM 9.7.1, Ada95 LRM 9.7.1
select_alternative ::=
[when condition =>]
selective_wait_alternativeThis function returns True if the specified select alternative includes a guard condition (which follows the reserved word when).
Parameters
Alternative : in Asis.Select_Alternative;Specifies the select-statement alternative that should be queried. This function returns True for the following kinds:
Element_Kinds Select_Alternative_Kinds
A_Select_Alternative A_Delay_Alternative
A_Terminate_Alternative
An_Accept_Alternative
return Boolean;Returns True for all elements in the above table that include a guard condition and False for anything else.
Errors
Examples
Cross-References
Related subprograms and types:
- function Arm_Select_Alternative
- function Else_Statements
- function Guard
- 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
- "Processing Selective Waits"
- Ada83 LRM 9.7.1, Ada95 LRM 9.7.1
Function Is_Labeled
function Is_Labeled (Statement : in Asis.Statement) return Boolean;Expanded Name Asis.Statements.Is_Labeled
Returns a Boolean value indicating whether the specified statement contains one or more labels.
Description
Labeled statements are defined by the following syntax:
Ada83 LRM 5.1, Ada95 LRM 5.1
statement ::= {label} simple_statement
| {label} compound_statementThis function returns True if one or more labels exist on the specified statement.
Parameters
Statement : in Asis.Statement;Specifies the statement that should be queried. This function returns True for the following kind:
Element_Kinds
A_Statement
return Boolean;Returns True for all elements in the above table that contain one or more labels and False for everything else.
Errors
Examples
Cross-References
- "Processing Labeled Statements"
- Ada83 LRM 5.1, Ada95 LRM 5.1
Function Is_Others_Handler
function Is_Others_Handler (Handler : in Asis.Exception_Handler) return Boolean;Expanded Name Asis.Statements.Is_Others_Handler
Returns a Boolean value indicating whether the specified exception is when others.
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 True if the specified exception handler defines an exception choice of when others.
Parameters
Handler : in Asis.Exception_Handler;Specifies the handler that should be queried. This function returns True for the following kind:
Element_Kinds
An_Exception_Handler
return Boolean;Returns True for all elements in the above table that define an exception choice of when others and False for anything else.
Errors
Examples
Cross-References
Function Is_Reverse_Loop_Parameter
function Is_Reverse_Loop_Parameter (Declaration : in Asis.Declaration) return Boolean;Expanded Name Asis.Statements.Is_Reverse_Loop_Parameter
Returns a Boolean value indicating whether the specified for loop declaration contains the reserved word reverse.
Description
Loop-parameter specifications are partially defined by the following syntax:
Ada83 LRM 5.5, Ada95 LRM 5.5
loop_parameter_specification ::=
identifier in [reverse] discrete_rangeThis function True if the reserved word reverse is included in the specified loop-parameter specification.
Parameters
Declaration : in Asis.Declaration;Specifies the declaration that should be queried. This function returns True for the following kinds:
Element_Kinds Declaration_Kinds
A_Declaration A_Loop_Parameter_Specification
return Boolean;Returns True for all elements in the above table that contain the reserved word reverse and False for everything else.
Errors
Examples
Cross-References
- function Is_Reverse_Loop_Parameter
- function Loop_Kind
- type Loop_Kinds
- function Loop_Parameter_Range
- function Loop_Simple_Name
- function Loop_Statements
- function While_Condition
- "Processing Loop Statements"
- Ada83 LRM 5.5, Ada95 LRM 5.5
Function Is_When_Others
function Is_When_Others (Alternative : in Asis.Case_Statement_Alternative) return Boolean;Expanded Name Asis.Statements.Is_When_Others
Returns a Boolean value indicating whether the specified case- statement alternative choice is when others.
Description
Case statements are 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;
case_statement_alternative ::=
when choice {| choice } =>
sequence_of_statementsThis function returns True when the specified case-statement alternative choice is the reserved word others.
Parameters
Alternative : in Asis.Case_Statement_Alternative;Specifies the case-statement alternative that should be queried. This function returns True for the following kind:
Element_Kinds
A_Case_Statement_Alternative
return Boolean;Returns True for all elements in the above table when the alternative defines the choice when others and False for anything else.
Errors
Examples
Cross-References
- function Case_Expression
- function Case_Statement_Alternative_Choices
- function Case_Statement_Alternative_Statements
- function Case_Statement_Alternatives
- "Processing Case Statements"
- Ada83 LRM 5.4, Ada95 LRM 5.4
Function Kind
function Kind (Statement : in Asis.Statement) return Statement_Kinds;Expanded Name Asis.Statements.Kind
Returns the kind of the specified statement.
Description
Elements of the kind A_Statement are returned in Statement_Lists. Statement_Lists are returned from the following functions:
- Accept_Body_Statements
- Arm_Statements
- Block_Body_Statements
- Case_Statement_Alternative_Statements
- Else_Statements
- Entry_Call_Statements
- Handler_Statements
- Loop_Statements
- Select_Alternative_Statements
- Timed_Entry_Call_Or_Statements
Statement_Lists can also contain elements that return Not_A_Statement from Kind. The following element kinds can also appear in Statement_Lists:
- A_Declaration
- A_Pragma
Parameters
Statement : in Asis.Statement;Specifies the if statement that should be queried. The alternative must be of the following kind:
Element_Kinds
A_Statement
return Statement_Kinds;Returns the actual Statement_Kinds for all elements in the above table and Not_A_Statement for all other elements.
Errors
Examples
Cross-References
Related subprograms and types:
- function Accept_Body_Statements
- function Arm_Statements
- function Block_Body_Statements
- function Case_Statement_Alternative_Statements
- function Else_Statements
- function Entry_Call_Statements
- function Handler_Statements
- function Loop_Statements
- function Select_Alternative_Statements
- function Timed_Entry_Call_Or_Statements
Function Label_Names
function Label_Names (Statement : in Asis.Statement) return Asis.Entity_Name_Definition_List;Expanded Name Asis.Statements.Label_Names
Returns a list of the labels on the specified statement.
Description
Labeled statements are defined by the following syntax:
Ada83 LRM 5.1, Ada95 LRM 5.1
statement ::= {label} simple_statement
| {label} compound_statementThis function returns a list of the label simple names applicable to the specified simple statement or compound statement. If no labels exist, Asis.Nil_Element_List is returned.
The Elements.Enclosing_Element of each entity-name definition returned is the statement.
Parameters
Statement : in Asis.Statement;Specifies the statement that should be queried. The statement must be of the following kinds:
Element_Kinds
A_Statement
return Asis.Entity_Name_Definition_List;The returned list contains elements of the following kind
Element_Kinds Expression_Kinds
An_Entity_Name_Definition 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 Labeled Statements"
- Ada83 LRM 5.1, Ada95 LRM 5.1
Function Loop_Exited
function Loop_Exited (Statement : in Asis.Statement) return Asis.Statement;Expanded Name Asis.Statements.Loop_Exited
Returns the loop statement exited by 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 statement identified by the loop name of the specified exit statement.
Parameters
Statement : in Asis.Statement;Specifies the loop statement that should be queried. The statement must be of the following kinds:
Element_Kinds Statement_Kinds
A_Statement An_Exit_Statement
return Asis.Statement;The returned element is of the following kinds:
Element_Kinds Statement_Kinds
A_Statement A_Loop_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 Exit Statements"
- Ada83 LRM 5.7, Ada95 LRM 5.7
Function Loop_Kind
function Loop_Kind (Statement : in Asis.Statement) return Loop_Kinds;Expanded Name Asis.Statements.Loop_Kind
Returns the kind of loop defined by the specified statement.
Description
Loop statements are partially defined by the following syntax:
Ada83 LRM 5.5, Ada95 LRM 5.5
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 iteration scheme for the specified loop statement.
Parameters
Statement : in Asis.Statement;Specifies the if statement that should be queried. The statement must be of the following kind:
Element_Kinds
A_Loop_Statement
return Loop_Kinds;Returns the actual loop kind for all elements in the above table and Not_A_Loop for all other elements.
Errors
Examples
Cross-References
Related subprograms and types:
- function For_Loop_Parameter_Specification
- function Is_Reverse_Loop_Parameter
- type Loop_Kinds
- function Loop_Parameter_Range
- function Loop_Simple_Name
- function Loop_Statements
- function While_Condition
- "Processing Loop Statements"
- Ada83 LRM 5.5, Ada95 LRM 5.5
Type Loop_Kinds
type Loop_Kinds is (...);Expanded Name Asis.Statements.Loop_Kinds
Describes the kinds of loop statements that are available.
Description
Loop statements are partially defined by the following syntax:
Ada83 LRM 5.5, Ada95 LRM 5.5
loop_statement ::=
[loop_simple_name:]
[iteration_scheme] loop
sequence_of_statements
end loop [loop_simple_name];
iteration_scheme ::= while condition
| for loop_parameter_specificationAda defines loop statements based on the iteration scheme. A loop statement can have either a while loop or a for loop iteration scheme, or it can have no iteration scheme.
The kind of a loop is returned by the Loop_Kind function.
Enumerations
A_For_LoopIndicates that an element represents a loop statement with a for loop iteration scheme (Ada83 LRM 5.6(6), Ada95 LRM 5.5).
A_Simple_LoopIndicates that an element represents a loop statement without an iteration scheme (Ada83 LRM 5.5(4), Ada95 LRM 5.5).
A_While_LoopIndicates that an element represents a loop statement with a while loop iteration scheme (Ada83 LRM 5.5(5), Ada95 LRM 5.5).
Not_A_LoopIndicates that an element does not represent a loop statement.
Cross-References
- "Processing Loop Statements"
- Ada83 LRM 5.5, Ada95 LRM 5.5
Function Loop_Parameter_Range
function Loop_Parameter_Range (Declaration : in Asis.Declaration) return Asis.Discrete_Range;Expanded Name Asis.Statements.Loop_Parameter_Range
Returns the discrete range for the specified for loop parameter declaration.
Description
Loop-parameter specifications are partially defined by the following syntax:
Ada83 LRM 5.5, Ada95 LRM 5.5
loop_parameter_specification ::=
identifier in [reverse] discrete_rangeThis function returns the discrete range of the specified loop-parameter specification.
Package Type_Definitions contains functions that can be used to decompose the range returned.
Parameters
Declaration : in Asis.Declaration;Specifies the loop declaration that should be queried. The declaration must be of the following kinds:
Element_Kinds Declaration_Kinds
A_Declaration A_Loop_Parameter_Specification
return Asis.Discrete_Range;The returned element is of the following kind:
Element_Kinds
A_Discrete_Range
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_Simple_Name
- function Loop_Statements
- function While_Condition
- function Type_Definitions.Discrete_Range_Kind
- "Processing Loop Statements"
- package Type_Definitions, "Processing Discrete Ranges"
- Ada83 LRM 5.5, Ada95 LRM 5.5
Function Loop_Simple_Name
function Loop_Simple_Name (Statement : in Asis.Statement) return Asis.Entity_Name_Definition;Expanded Name Asis.Statements.Loop_Simple_Name
Returns the name of the specified loop.
Description
Loop statements are partially defined by the following syntax:
Ada83 LRM 5.5, Ada95 LRM 5.5
loop_statement ::=
[loop_simple_name:]
[iteration_scheme] loop
sequence_of_statements
end loop [loop_simple_name];This function returns the loop simple name for the specified loop statement.
If a loop simple name does not exist, Asis.Nil_Element is returned.
The Elements.Enclosing_Element of the name definition is the specified statement.
Parameters
Statement : in Asis.Statement;Specifies the loop statement that should be queried. The statement must be of the following kinds:
Element_Kinds Statement_Kinds
A_Statement A_Loop_Statement
return Asis.Entity_Name_Definition;The returned element is of the following kinds:
Element_Kinds Expression_Kinds
An_Entity_Name_Definition 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 and types:
- function For_Loop_Parameter_Specification
- function Is_Reverse_Loop_Parameter
- function Loop_Kind
- type Loop_Kinds
- function Loop_Parameter_Range
- function Loop_Statements
- function While_Condition
- function Elements.Enclosing_Element
- "Processing Loop Statements"
- Ada83 LRM 5.5, Ada95 LRM 5.5
Function Loop_Statements
function Loop_Statements (Statement : in Asis.Statement; Include_Pragmas : in Boolean := False) return Asis.Statement_List;Expanded Name Asis.Statements.Loop_Statements
Returns a list of all statements and, optionally, pragmas present in the specified loop statement.
Description
Loop statements are partially defined by the following syntax:
Ada83 LRM 5.5, Ada95 LRM 5.5
loop_statement ::=
[loop_simple_name:]
[iteration_scheme] loop
sequence_of_statements
end loop [loop_simple_name];This function returns the sequence of statements for the specified loop 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.
Element_Kinds Calls to Use
A_Pragma Elements.
Argument_Associations
Is_Predefined
Name
Pragma_Kind
A_Statement Statements.
(most subprograms)
Parameters
Statement : in Asis.Statement;Specifies the loop statement that should be queried. The statement must be of the following kinds:
Element_Kinds Statement_Kinds
A_Statement A_Loop_Statement
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 For_Loop_Parameter_Specification
- function Is_Reverse_Loop_Parameter
- function Loop_Kind
- type Loop_Kinds
- function Loop_Parameter_Range
- function Loop_Simple_Name
- function While_Condition
- "Processing Loop Statements"
- Ada83 LRM 5.5, Ada95 LRM 5.5
Function Object_Assigned_To
function Object_Assigned_To (Statement : in Asis.Statement) return Asis.Expression;Expanded Name Asis.Statements.Object_Assigned_To
Returns the variable name that is being assigned an expression in the specified assignment statement.
Description
Assignment statements are defined by the following syntax:
Ada83 LRM 5.2, Ada95 LRM 5.2
assignment_statement ::=
variable_name ::= expression;This function returns the variable name of the specified assignment statement.
Parameters
Statement : in Asis.Statement;Specifies the assignment statement that should be queried. The statement must be of the following kinds:
Element_Kinds Statement_Kinds
A_Statement An_Assignment_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 Assignment Statements"
- package Expressions, "Processing Expressions"
- Ada83 LRM 5.2, Ada95 LRM 5.2
Function Qualified_Expression
function Qualified_Expression (Statement : in Asis.Statement) return Asis.Expression;Expanded Name Asis.Statements.Qualified_Expression
Returns the qualified record-aggregate expression that represents the specified code statement.
Description
Machine-code insertions are defined by the following syntax:
Ada83 LRM 13.8, Ada95 LRM 13.8
code_statement ::= type_mark'record_aggregate;This function returns the code statement.
The type-mark component then can be obtained with Expressions.Type_Mark. The record-aggregate component can be obtained with Expressions.Converted_Or_Qualified_Expression.
Parameters
Statement : in Asis.Statement;Specifies the code statement that should be queried. The statement must be of the following kinds:
Element_Kinds Statement_Kinds
A_Statement A_Code_Statement
return Asis.Expression;The returned element is of the following kind:
Element_Kinds
A_Qualified_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 Machine-Code Insertions"
- Ada83 LRM 13.8, Ada95 LRM 13.8
Rational Software Corporation
http://www.rational.com support@rational.com techpubs@rational.com Copyright © 1993-2001, Rational Software Corporation. All rights reserved. |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |