TOC PREV NEXT INDEX DOC LIST MASTER INDEX




Function Family_Index

Expanded Name Asis.Statements.Family_Index

Returns the family-index expression from the specified accept or entry-call statement.

Description

Accept statements are defined by the following syntax:

Ada83 LRM 9.5, Ada95 LRM 9.5

 accept_statement ::=
  accept entry_simple_name [(entry_index)]
   [formal_part]
  [do
   sequence_of_statements
  end [entry_simple_name]];

If the statement is an accept statement, this function returns the associated entry-index expression.

Entry statements are defined by the following syntax:

Ada83 LRM 9.5, Ada95 LRM 9.5

 entry_call_statement ::=
  entry_name [actual_parameter_part];

The entry name can include an entry index if a family of entries is defined. See "Processing Accept Statements" for moreinformation.

If the statement is an entry-call statement, this function returns the entry-index expression of the associated actual parameter part.

If an entry index does not exist, Asis.Nil_Element is returned.

Parameters

Specifies the accept or entry-call statement that should be queried. The statement must be of the following kinds:
Element_Kinds
Statement_Kinds
A_Statement
An_Accept_Statement
An_Entry_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 subprograms:

Related concepts:


Function For_Loop_Parameter_Specification

Expanded Name Asis.Statements.For_Loop_Parameter_Specification

Returns the declaration of the loop-parameter specification for the specified for 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];

 iteration_scheme ::= while condition
  | for loop_parameter_specification

 loop_parameter_specification ::=
  identifier in [reverse] discrete_range

This function returns the loop-parameter specification for the specified loop statement.

The Declarations.Names function returns the An_Entity_Name-_Definition of the loop-parameter specification.

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

The returned element is of the following kind:
Element_Kinds
Declaration_Kinds
A_Declaration
A_Loop_Parameter_Specification

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 Formal_Parameter

Expanded Name Asis.Statements.Formal_Parameter

Returns the name associated with the specified parameter.

Description

Parameter associations are partially defined by the following syntax:

Ada83 LRM 6.4, Ada95 LRM 6.4

 parameter_association ::=
  [formal_parameter =>] actual_parameter

 formal_parameter ::= parameter_simple_name

This function returns the formal-parameter name for the specified parameter association.

Parameters are obtained from an Association_List. The list defines the parameter associations for procedure calls, function calls, entry calls, generic instantiations, and pragmas.

The results of the function depend on whether the association Parameter comes from a normalized or unnormalized Association_List.

Description (continued)

If the association is from a normalized list:

If the association is from a unnormalized list:

Association lists for pragmas are available only in unnormalized form. This occurs because there is no declaration for pragmas, so the arguments cannot be normalized.

See package Environment, "Normalization of Parameter Lists," for more information on normalized and unnormalized lists.

An ASIS implementation may choose to always include defaulted expressions in the Association_List for the parameters not specified. See package Environment, "Default Parameter Processing," for more information.

Parameters

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

A_Parameter_Association
An_Argument_Association

The returned element is of the following kinds:
Element_Kinds
Expression_Kinds
An_Entity_Name_Definition
A_Simple_Name
An_Expression
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.

Asis_Failed is raised and Environment.Status is set to Obsolete_Reference_Error if a parameter is part of an obsolete compilation unit.

Examples

Cross-References

Related subprograms:

Related concepts:


Function Goto_Label

Expanded Name Asis.Statements.Goto_Label

Returns the expression that represents the label name in the specified goto statement.

Description

Goto statements are defined by the following syntax:

Ada83 LRM 5.9, Ada95 LRM 5.9

 goto_statement ::= goto label_name;

This function returns the label name for the specified goto
statement.

Parameters

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

The returned element is of the following kinds:
Element_Kinds
Expression_Kinds
An_Expression
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 subprogram:

Related concepts:


Function Guard

Expanded Name Asis.Statements.Guard

Returns the expression representing the guard condition on the specified selective-wait alternative.

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 the guard condition (which follows the reserved word when) for the specified select alternative.

If a guard does not exist, Asis.Nil_Element is returned.

Parameters

Specifies the selective-wait statement alternative that should be queried. The alternative must be of the following kinds:
Element_Kinds
Statement_Kinds
A_Select_Alternative
A_Delay_Alternative
A_Terminate_Alternative
An_Accept_Alternative

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:


Function Handler_Statements

Expanded Name Asis.Statements.Handler_Statements

Returns the sequence of statements and, optionally, pragmas associated with the specified 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

This function returns the sequence of statements for the specified exception-handler arm.

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 handler that should be queried. The handler must be of the following kind:
Element_Kinds

An_Exception_Handler

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:

Related concepts:


Function If_Statement_Arm_Kind

Expanded Name Asis.Statements.If_Statement_Arm_Kind

Returns the arm kind for the specified arm of an if statement.

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 kind of the specified if-statement arm.

Parameters

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

An_If_Statement_Arm

Returns the arm kind for all elements in the above table and Not_An_If_Statement_Arm 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 If_Statement_Arm_Kinds

Expanded Name Asis.Statements.If_Statement_Arm_Kinds

Describes the if-statement arm kinds that are available.

Description

If-statement processing is based on the concept of arms. An arm is one of:

This enumeration describes the names for the arms

The kind of an if-statement arm is returned by the If_State-
ment_Arm_Kind_Function.

Enumerations

Indicates that an element represents an arm that contains the sequence of statements following the reserved word else.

Indicates that an element represents an arm that contains the condition and sequence of statements following the reserved word elsif.

Indicates that an element represents an arm that contains the condition and sequence of statements following the reserved word if.

Indicates that the element does not represent an if-statement arm.

Cross-References

Related subprograms:

Related concepts:


Function If_Statement_Arms

Expanded Name Asis.Statements.If_Statement_Arms

Returns a list of the arms contained in the specified if statement.

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 a list of the arms for the specified if
statement.

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

Parameters

Specifies the if statement that should be queried. The statements must be of the following kinds:
Element_Kinds
Statement_Kinds
A_Statement
An_If_Statement

The returned list contains elements of the following kind
Element_Kinds

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


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