TOC PREV NEXT INDEX DOC LIST MASTER INDEX




Function Is_Implicit

Expanded Name Asis.Expressions.Is_Implicit

Returns a Boolean value indicating whether the specified entity reference has no explicit text associated with it.

Description

Whenever a type is declared, a set of operations for the type is implicitly declared. These implicitly declared operations depend on the class of the type. These operations include the basic operations (Ada83 LRM 3.5.5, 3.5.10, 3.6.2, 3.7.4, and 3.8.2,, Ada95 LRM 3.5.5, 3.5.10, 3.6.2, 3.8, and 3.10.2), attribute functions (Ada83 LRM 3.5.5, Ada95 LRM 3.5.5), the predefined operators (Ada83 LRM 4.5, Ada95 LRM 4.5), and enumeration literals (Ada83 LRM 3.5.1, Ada95 LRM 3.5.1).

This function returns True if the specified entity reference is an implicitly defined subprogram.

Elements of any portion of these declarations test as Declara-tions.Is_Part_Of_Implicit.

For further analysis:

Parameters

Specifies the entity reference that should be queried. The reference must be of the following kinds:
Element_Kinds
Expression_Kinds
An_Entity_Name_Definition
A_Character_Literal
A_Simple_Name
An_Enumeration_Literal
An_Operator_Symbol

An_Expression
A_Character_Literal
A_Simple_Name
An_Enumeration_Literal
An_Operator_Symbol

Returns True for all elements in the above table that represent implicitly defined subprograms and False 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.

Examples

Cross-References

Related subprograms:

Related concepts:


Function Is_Literal

Expanded Name Asis.Expressions.Is_Literal

Returns a Boolean value indicating whether the specified expression represents a literal value.

Description

Elements with the following Expression_Kinds represent literals:

You can obtain the text image of a literal with the Static_Value function.

Parameters

Specifies the expression that should be queried. The expression must be of the following kinds:
Element_Kinds
Expression_Kinds
An_Expression
A_Character_Literal
A_Null_Literal
A_Real_Literal
A_String_Literal
An_Enumeration_Literal
An_Integer_Literal

Returns True for all elements in the above table and False 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.

Examples

Cross-References

Related subprogram:

Related concepts:


Function Is_Normalized

Expanded Name Asis.Expressions.Is_Normalized

Returns a Boolean value indicating whether the specified association is from a normalized association list.

Description

Associations represent the pairing of a name and a value. The name represents the formal parameter and the value the actual parameter.

A number of functions return lists containing associations:
Function Name
Association Element_Kinds
Components
A_Component_Association
Type_Definitions.Discriminant-_Associations
A_Discriminant_Association
Function_Call_Parameters Declarations.Generic-
_Parameters
Statements.Call_Parameters
A_Parameter_Association

Each of the above functions contains a Normalized parameter. This parameter determines whether the returned list contains normalized or unnormalized associations. Not all ASIS implementations are able to return unnormalized lists. In this case, the Normalized parameter is ignored and all returned lists contain normalized associations. See package Environment, "Normalization of Parameter Lists" for more information.

Parameters

Specifies the component, discriminant, or parameter association that should be queried. The assocation must be of the following kinds:
Element_Kinds

A_Component_Association
A_Discriminant_Association
A_Parameter_Association


Returns True for all elements in the above table that were obtained in normalized form and False 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.

Examples

Cross-References

Related subprograms:

Related concepts:


Function Is_Parameter_Association

Expanded Name Asis.Expressions.Is_Parameter_Association

Returns a Boolean value indicating whether the specified element represents a parameter association.

Description

Parameter-association elements are returned by the following functions:

Parameters

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

A_Parameter_Association

Returns True for all elements in the above table and False 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.

Examples

Cross-References

Related subprograms:

Related concept:


Function Is_Predefined

Expanded Name Asis.Expressions.Is_Predefined

Returns a Boolean value indicating whether the specified entity reference represents a predefined operator or attribute.

Description

For each form of type declaration, certain operators are predefined (Ada83 LRM 4.5, Ada95 LRM 4.5). For discrete types, certain attribute functions are considered basic operations and are also predefined (Ada83 LRM 3.5.5, Ada95 LRM 3.5.5).

This function returns True if the entity reference represents a predefined operator or attribute.

For further analysis:

Parameters

Specifies the entity reference that should be queried. The reference must be of the following kinds:
Element_Kinds
Expression_Kinds
An_Entity_Name_Definition
A_Character_Literal
A_Simple_Name
An_Enumeration_Literal
An_Operator_Symbol

An_Expression
A_Character_Literal
A_Simple_Name
An_Enumeration_Literal
An_Operator_Symbol

Returns True for all elements in the above table that represent predefined operators or attribute functions and False 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.

Examples

Cross-References

Related subprograms:

Related concept:


Function Is_Prefix_Call

Expanded Name Asis.Expressions.Is_Prefix_Call

Returns a Boolean value indicating whether the specified function call was given in prefix notation.

Description

Not all ASIS implementations support detection of prefix notation in function calls. In prefix notation, the function operator is specified before the parameter(s). The Environment.Is_Prefix_Call-_Supported function can be used to determine whether the ASIS implementation can identify the use of prefix notation.

Parameters

Specifies the function call that should be queried. The expression must be of the following kinds:
Element_Kinds
Expression_Kinds
An_Expression
A_Function_Call

Returns True for all elements in the above table that represent function calls made in prefix notation and False 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.

Examples

For example:

The addition of B and C uses infix notation and will never be reported as prefix notation.

The addition of Y and Z uses prefix notation. If False is returned from Environment.Is_Prefix_Call_Supported, ASIS reports this as infix notation; otherwise, ASIS reports it as prefix notation.

Cross-References

Related subprogram:

Related concept:


Function Is_Referenced

Expanded Name Asis.Expressions.Is_Referenced

Returns a Boolean value indicating whether the specified name is referenced within the specified context.

Description

If the Name parameter represents An_Entity_Name_Definition, the search is performed with the Name entity.

If the Name parameter represents An_Expression, the search is performed with the Name_Definition of the Name entity.

The Context parameter can be any Element_Kinds such as A_Choice or A_Type_Definition but typically will be A_Statement, particularly a block statement, or A_Declaration, typically of a library or secondary unit.

Parameters

Specifies the entity that should be queried. The name must be of the following kinds:
Element_Kinds
Expression_Kinds
An_Entity_Name_Definition
A_Character_Literal
A_Simple_Name
An_Enumeration_Literal
An_Operator_Symbol

An_Expression
A_Character_Literal
A_Simple_Name
An_Enumeration_Literal
An_Operator_Symbol

Specifies the context for the query.

Returns True for all elements in the above table where the entity is referenced within the specified context and False 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.

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 Is_Static

Expanded Name Asis.Expressions.Is_Static

Returns a Boolean value indicating whether the specified expression represents a static expression.

Description

Certain expressions of a scalar type are said to be static. Similarly, certain discrete ranges are said to be static, and the type marks of certain scalar subtypes are said to denote static subtypes (Ada83 LRM 4.9, Ada95 LRM 4.9).

You can obtain the text image of a static expression with the Static_Value function.

Parameters

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

An_Expression

Returns True for all elements in the above table that represent static expressions and False 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.

Examples

Cross-References

Related subprogram:

Related concepts:


Function Is_Universal

Expanded Name Asis.Expressions.Is_Universal

Returns a Boolean value indicating whether the specified expression represents a universal-integer or universal-real expression.

Description

A universal expression is an expression that delivers a result of either type universal integer or type universal real (Ada83 LRM 4.10, Ada95 LRM 4.9.1).

A universal expression can be static. You can determine whether the expression is static by calling the Is_Static function. If the universal expression is static, you can obtain the value with the Static_Value function.

Parameters

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

An_Expression

Returns True for all elements in the above table that represent universal-integer or universal-real expressions and False 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.

Examples

Cross-References

Related subprograms:

Related concepts:


Function Kind

Expanded Name Asis.Expressions.Kind

Returns the kind of the specified expression.

Description

An expression is a formula that defines the computation of a value (Ada83 LRM 4.4, Ada95 LRM 4.4). Expressions are recursive structures of primaries and operators, and they are represented by elements. Primaries include such things as literals, names, and function calls. Operators include such things as relational operators, binary and unary adding operators, and membership tests. Each element of an expression has an Element_Kinds of An_Expression.

While the parameter profile for the function indicates that only an expression is permitted, you can also request information about an entity name definition or a choice.

This function returns the Expression_Kinds of the specified element.

Parameters

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

An_Expression
A_Choice
An_Entity_Name_Definition


Returns the kind of expression for all elements in the above table and Not_An_Expression 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.

Examples

Cross-References

Related type:

Related concept:


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