TOC PREV NEXT INDEX DOC LIST MASTER INDEX




Function Raised_Exception

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

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:

Parameters

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

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:


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

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

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 Select_Alternative_Kind

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_alternative

This function returns the selective-wait alternative kind for the specified selective-wait select alternative.

Parameters

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

A_Select_Alternative

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:

Related concepts:


Type Select_Alternative_Kinds

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

Indicates that an element represents a delay statement optionally followed by a sequence of statements.

Indicates that an element represents a terminate alternative consisting solely of the reserved word terminate.

Indicates that an element represents an accept statement optionally followed by a sequence of statements.

Indicates that an element does not represent a selective-wait alternative.

Cross-References

Related subprogram:

Related concepts:


Function Select_Alternative_Statements

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.

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

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 Select_Statement_Arm_Kind

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:

This function returns the kind of select statement arm specified by Arm.

Parameters

Specifies the select-statement arm that should be queried. The arm must be of the following kind:
Element_Kinds

A_Select_Statement_Arm

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

None.

Examples

Cross-References

Related subprogram and type:

Related concept:


Type Select_Statement_Arm_Kinds

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:

This type describes the names for the arms.

The arm kinds are returned by the Select_Statement_Arm_Kind function.

Enumerations

Identifies the sequence of statements that follows the else reserved word in a conditional entry call.

Identifies the sequence of statements that follows the select reserved word in a conditional entry-call select statement.

Identifies the sequence of statements that follows the else reserved word in a selective wait.

Identifies the sequence of statements that follows the or reserved word in a selective wait.

Identifies the sequence of statements that follows the select reserved word in a selective wait.

Identifies the sequence of statements that follows the or reserved word in a timed entry call.

Identifies the sequence of statements that follows the select reserved word in a timed entry call.

Cross-References

Related subprogram:

Related concept:


Function Select_Statement_Arms

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:
select_statement
Select_Statement_Arm_Kinds
selective_wait
A_Selective_Wait_Else_Arm
A_Selective_Wait_Or_Arm
A_Selective_Wait_Select_Arm

conditional_entry_call
A_Conditional_Entry_Call_Else_Arm
A_Conditional_Entry_Call_Select_Arm

timed_entry_call
A_Timed_Entry_Call_Or_Arm
A_Timed_Entry_Call_Select_Arm

The arms are returned in their order of appearance in the source code.

Parameters

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

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:

Related concepts:


Type Statement_Kinds

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:
Statement_Kinds
Ada Statement
A_Block_Statement
block_statement (Ada83 LRM 5.6 Ada95 LRM 5.6)
A_Case_Statement
case_statement (Ada83 LRM 5.4 Ada95 )LRM 5.4)
A_Code_Statement
code_statement (Ada83 LRM 13.8 Ada95 )LRM 13.8)
A_Conditional_Entry_Call_Statement
conditional_entry_call
select statement (Ada83 LRM
9.7.2 Ada95 LRM 9.7.3)
A_Delay_Statement
delay_statement (Ada83 LRM 9.6 Ada95 LRM 9.6)
A_Goto_Statement
goto_statement (Ada83 LRM 5.9 Ada95 LRM 5.8)
A_Loop_Statement
loop_statement (Ada83 LRM 5.5 Ada95 LRM 5.5)
A_Null_Statement
null_statement (Ada83 LRM 5.1 Ada95 LRM 5.1)
A_Procedure_Call_Statement
procedure_call_statement (Ada83 LRM 6.4 Ada95 LRM 6.4)
A_Raise_Statement
raise_statement (Ada83 LRM 11.3 Ada95 LRM 11.3)
A_Return_Statement
return_statement (Ada83 LRM 5.8 Ada95 LRM 6.5)
Statement_Kinds
Ada Statement
A_Selective_Wait_Statement
selective_wait
select statemen
t (Ada83 LRM
9.7.1 Ada95 LRM 9.7.1)
A_Timed_Entry_Call_Statement
timed_entry_call
select statement
(Ada83 LRM
9.7.3 Ada95 LRM 9.7.2)
An_Abort_Statement
abort_statement (Ada83 LRM 9.10 Ada95 LRM 9.10)
An_Accept_Statement
accept_statement (Ada83 LRM 9.5 Ada95 LRM 9.5)
An_Assignment_Statement
assignment_statement (Ada83 LRM 5.2 Ada95 LRM 5.2)
An_Entry_Call_Statement
entry_call_statement (Ada83 LRM 9.5 Ada95 LRM 9.5)
An_Exit_Statement
exit_statement (Ada83 LRM 5.7 Ada95 LRM 5.7)
An_If_Statement
if_statement (Ada83 LRM 5.3 Ada95 LRM 5.3)
Not_A_Statement
——

Cross-References

Related subprogram:

Related concept:


Function Timed_Entry_Call_Or_Statements

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.

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

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 While_Condition

Expanded Name Asis.Statements.While_Condition

Returns the expression from the specified while 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 condition of the iteration scheme for the specified loop statement.

Parameters

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

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:


Package 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

Related subprograms and types:

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