TOC PREV NEXT INDEX DOC LIST MASTER INDEX




Function Slice_Range

Expanded Name Asis.Expressions.Slice_Range

Returns the discrete range from the specified slice expression.

Description

Slices are defined by the following syntax:

Ada83 LRM 4.1.2, Ada95 LRM 4.1.2 

slice ::= prefix(discrete_range)

This function returns the discrete range from the specified slice.

You can further analyze the returned discrete range with functions in package Type_Definitions.

Parameters

Specifies the slice that should be queried. The expression must be of the following kinds:
Element_Kinds
Expression_Kinds
An_Expression
A_Slice

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:

Related concepts:


Function Special_Operation_Kind

Expanded Name Asis.Expressions.Special_Operation_Kind

Returns the kind of special operation represented by the specified expression.

Description

Special operations are defined as short-circuit control forms and membership tests. These are contained within the expression and relation syntax components.

Expressions are defined by the following syntax:

Ada83 LRM 4.4, Ada95 LRM 4.4

 expression ::=
   relation {and relation}
  | relation {and then relation}
  | relation {or relation}
  | relation {[or else relation}
  | relation {xor relation}

The reserved words and then and or else represent the short-circuit control forms.

Relations are defined by the following syntax:

Ada83 LRM 4.4, Ada95 LRM 4.4

 relation ::=
   simple_expression
    [relational_operator simple_expression]
  | simple_expression [not] in range
  | simple_expression [not] in type_mark

The reserved words in and not in represent membership tests.

This function returns the kind of special operation represented by the specified expression.

Parameters

Specifies the special operation that should be queried. The expression must be of the following kinds:
Element_Kinds
Expression_Kinds
An_Expression
A_Special_Operation

Returns the special operation kind of the specified expression. If an unexpected expression is specified, Not_A_Special_Opera-tion is returned.

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.

Examples

Cross-References

Related type:

Related concept:


Type Special_Operation_Kinds

Expanded Name Asis.Expressions.Special_Operation_Kinds

Describes the kinds of short-circuit control forms and membership tests.

Description

The short-circuit control forms are:

The membership tests are:

Enumerations

Indicates that the element represents a "not in range" membership test (Ada83 LRM 4.5.2, Ada95 LRM 4.5.2).

Indicates that the element represents a "not in type_mark" membership test (Ada83 LRM 4.5.2, Ada95 LRM 4.5.2).

Indicates that the element represents an "and then" short-circuit control form (Ada83 LRM 4.5.1, Ada95 LRM 4.5.1).

Indicates that the element represents an "in range" membership test (Ada83 LRM 4.5.2, Ada95 LRM 4.5.2).

Indicates that the element represents an "in type_mark" membership test (Ada83 LRM 4.5.2, Ada95 LRM 4.5.2).

Indicates that the element represents an "or else" short-circuit control form (Ada83 LRM 4.5.1, Ada95 LRM 4.5.1).

Indicates that the element does not represent a short-circuit control form or a membership test.

Cross-References

Related subprogram:

Related concepts:


Function Special_Operation_Left_Hand_Side

Expanded Name Asis.Expressions.Special_Operation_Left_Hand_Side

Returns the expression on the left side of the specified special operation expression.

Description

This function returns the parameter value on the left side for all special operations.

Expressions are defined by the following syntax:

Ada83 LRM 4.4, Ada95 LRM 4.4

 expression ::=
   relation {and relation}
  | relation {and then relation}
  | relation {or relation}
  | relation {[or else relation}
  | relation {xor relation}

If the specified expression represents a short-circuit control form, this function returns the expression representing the relation.

Relations are defined by the following syntax:

Ada83 LRM 4.4, Ada95 LRM 4.4

 relation ::=
   simple_expression
    [relational_operator simple_expression]
  | simple_expression [not] in range
  | simple_expression [not] in type_mark

If the specified expression represents a membership test, this function returns the expression representing the simple
expression.

Parameters

Specifies the special operation that should be queried. The expression must be of the following kinds:
Element_Kinds
Expression_Kinds
An_Expression
A_Special_Operation

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 Static_Value

Expanded Name Asis.Expressions.Static_Value

Returns the text image of the specified static expression.

Description

If the specified expression represents a string literal, the returned text image will contain the enclosing quotation characters and any interior quotation characters are doubled (Ada83 LRM 2.6, Ada95 LRM 2.6).

Similarly, character literals are enclosed within apostrophes (Ada83 LRM 2.5, Ada95 LRM 2.5).

The case and base of numbers returned by this function will vary among vendors. Vendors are encouraged, but not required, to return values in the same case and base as was used in the original compilation text.

Rational Apex returns the value as it appears in the source code.

If the specified expression does not represent a static value, a null string is returned. Note that if the expression represents a null string, the returned text image will contain two quotation characters and thus no confusion can result between a value that is not static and a null string.

Parameters

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

An_Expression

Returns the text image of the specified static 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 Subprogram_Derivation

Expanded Name Asis.Expressions.Subprogram_Derivation

Returns the declaration from which the specified implicit derived subprogram was ultimately derived.

Description

The returned declaration may be an implicit subprogram but will not be a derived subprogram.

Parameters

Specifies the naming expression for the subprogram that should be queried. The name must be of the following kinds:
Element_Kinds
Expression_Kinds
An_Entity_Name_Definition
A_Simple_Name
An_Operator_Symbol

An_Expression
A_Simple_Name
An_Operator_Symbol

The returned element is of the following kinds:
Element_Kinds
Declaration_Kinds
A_Declaration
A_Function_Body_Declaration
A_Function_Declaration
A_Function_Rename_Declaration
A_Procedure_Body_Declaration
A_Procedure_Declaration
A_Procedure_Rename_Declaration

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_Inappropriate_Element is raised and Enviromnment.Status is set to Value_Error if the name does not reference a derived subprogram.

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

Examples

Cross-References

Related subprograms:

Related concept:


Function Type_Mark

Expanded Name Asis.Expressions.Type_Mark

Returns the type mark from the specified qualified expression or type-conversion expression.

Description

This function accepts a type conversion or qualified expression as a parameter.

Type conversions are defined by the following syntax:

Ada83 LRM 4.6, Ada95 LRM 4.6

 type_conversion ::= type_mark(expression)

Qualified expressions are defined by the following syntax:

Ada83 LRM 4.7, Ada95 LRM 4.7 

qualified_expression ::=
  type_mark'(expression) | type_mark'aggregate

This function returns the type mark from the specified type conversion or qualified expression.

Parameters

Specifies the expression that should be queried. The expression must be of the following kinds:
Element_Kinds
Expression_Kinds
An_Expression
A_Qualified_Expression
A_Type_Conversion

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:


Package Operations

Expanded Name Asis.Expressions.Operations

Package Operations provides a simple way to obtain visibility to operators for types used in package Expressions. The package typically is referenced in a use clause by an application.

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