TOC PREV NEXT INDEX DOC LIST MASTER INDEX




Function Is_Guarded

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_alternative

This function returns True if the specified select alternative includes a guard condition (which follows the reserved word when).

Parameters

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

Returns True for all elements in the above table that include a guard condition and False for anything else.

Errors

None.

Examples

Cross-References

Related subprograms and types:

Related concepts:


Function Is_Labeled

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_statement

This function returns True if one or more labels exist on the specified statement.

Parameters

Specifies the statement that should be queried. This function returns True for the following kind:
Element_Kinds

A_Statement

Returns True for all elements in the above table that contain one or more labels and False for everything else.

Errors

None.

Examples

Cross-References

Related subprogram:

Related concepts:


Function Is_Others_Handler

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 | others

This function returns True if the specified exception handler defines an exception choice of when others.

Parameters

Specifies the handler that should be queried. This function returns True for the following kind:
Element_Kinds

An_Exception_Handler

Returns True for all elements in the above table that define an exception choice of when others and False for anything else.

Errors

None.

Examples

Cross-References

Related subprograms:

Related concepts:


Function Is_Reverse_Loop_Parameter

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_range

This function True if the reserved word reverse is included in the specified loop-parameter specification.

Parameters

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

Returns True for all elements in the above table that contain the reserved word reverse and False for everything else.

Errors

None.

Examples

Cross-References

Related subprograms:

Related concepts:


Function Is_When_Others

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_statements

This function returns True when the specified case-statement alternative choice is the reserved word others.

Parameters

Specifies the case-statement alternative that should be queried. This function returns True for the following kind:
Element_Kinds

A_Case_Statement_Alternative

Returns True for all elements in the above table when the alternative defines the choice when others and False for anything else.

Errors

None.

Examples

Cross-References

Related subprograms:

Related concepts:


Function Kind

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:

Statement_Lists can also contain elements that return Not_A_Statement from Kind. The following element kinds can also appear in Statement_Lists:

Parameters

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

A_Statement

Returns the actual Statement_Kinds for all elements in the above table and Not_A_Statement for all other elements.

Errors

None.

Examples

Cross-References

Related subprograms and types:

Related concept:


Function Label_Names

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_statement

This 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

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

A_Statement

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

Related subprograms:

Related concepts:


Function Loop_Exited

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

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

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

Related subprograms:

Related concepts:


Function Loop_Kind

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_specification

This function returns the iteration scheme for the specified loop statement.

Parameters

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

A_Loop_Statement

Returns the actual loop kind for all elements in the above table and Not_A_Loop for all other elements.

Errors

None.

Examples

Cross-References

Related subprograms and types:

Related concepts:


Type Loop_Kinds

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_specification

Ada 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

Indicates that an element represents a loop statement with a for loop iteration scheme (Ada83 LRM 5.6(6), Ada95 LRM 5.5).

Indicates that an element represents a loop statement without an iteration scheme (Ada83 LRM 5.5(4), Ada95 LRM 5.5).

Indicates that an element represents a loop statement with a while loop iteration scheme (Ada83 LRM 5.5(5), Ada95 LRM 5.5).

Indicates that an element does not represent a loop statement.

Cross-References

Related subprogram:

Related concepts:


Function Loop_Parameter_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_range

This 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

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

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:

Related concepts:


Function Loop_Simple_Name

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

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

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:

Related concepts:


Function Loop_Statements

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.

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 loop statement that should be queried. The statement must be of the following kinds:
Element_Kinds
Statement_Kinds
A_Statement
A_Loop_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 and types:

Related concepts:


Function Object_Assigned_To

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

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

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

Related concepts:


Function Qualified_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

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

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

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