![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Function Is_Implicit
function Is_Implicit (Reference : in Asis.Element) return Boolean;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.
- Use Expression_Type to obtain the type definition that created this predefined operator or attribute.
- Use Name_Definition to obtain the declaration of the predefined operator or attribute.
Parameters
Reference : in Asis.Element;Specifies the entity reference that should be queried. The reference must be of the following kinds:
return Boolean;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
- function Expression_Associated_Type
- function Name_Definition
- function Declarations.Is_Part_Of_Implicit
- "Processing Implicit Subprograms"
- "Processing Operators"
- package Declarations, "Processing Implicit and Derived Operations"
Function Is_Literal
function Is_Literal (Expression : in Asis.Expression) return Boolean;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:
- A_Character_Literal (Ada83 LRM 2.5, Ada95 LRM 2.5)
- A_Null_Literal (Ada83 LRM 3.8, Ada95 LRM 3.8)
- A_Real_Literal (Ada83 LRM 2.4, Ada95 LRM 2.4)
- A_String_Literal (Ada83 LRM 2.6, Ada95 LRM 2.6)
- An_Enumeration_Literal (Ada83 LRM 3.5.1, Ada95 LRM 3.5.1)
- An_Integer_Literal (Ada83 LRM 2.4, Ada95 LRM 2.4)
You can obtain the text image of a literal with the Static_Value function.
Parameters
Expression : in Asis.Expression;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
return Boolean;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
- "Processing Literals"
- Ada83 LRM 2.4, Ada95 LRM 2.4
- Ada83 LRM 2.5, Ada95 LRM 2.5
- Ada83 LRM 2.6, Ada95 LRM 2.6
- Ada83 LRM 3.5.1, Ada95 LRM 3.5.1
- Ada83 LRM 3.8, Ada95 LRM 3.8
Function Is_Normalized
function Is_Normalized (Association : in Asis.Element) return Boolean;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:
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
Association : in Asis.Element;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
return Boolean;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
- function Components
- function Function_Call_Parameters
- function Declarations.Generic_Parameters
- function Statements.Call_Parameters
- function Type_Definitions.Discriminant_Associations
Function Is_Parameter_Association
function Is_Parameter_Association (Element : in Asis.Element) return Boolean;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
Element : in Asis.Element;Specifies the element that should be queried. The element must be of the following kind:
Element_Kinds
A_Parameter_Association
return Boolean;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
- function Function_Call_Parameters
- function Statements.Call_Parameters
- function Declarations.Generic_Parameters
Function Is_Predefined
function Is_Predefined (Reference : in Asis.Element) return Boolean;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.
- Use Expression_Type to obtain the type definition that created this predefined operator or attribute.
- Use Name_Definition to obtain the declaration of the predefined operator or attribute.
Parameters
Reference : in Asis.Element;Specifies the entity reference that should be queried. The reference must be of the following kinds:
return Boolean;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
- "Processing Operators" and "Processing Implicit Subprograms"
Function Is_Prefix_Call
function Is_Prefix_Call (Expression : in Asis.Expression) return Boolean;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
Expression : in Asis.Expression;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
return Boolean;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
A := B + C;X := "+"(Y, Z);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
Function Is_Referenced
function Is_Referenced (Name : in Asis.Element; Context : in Asis.Element) return Boolean;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
Name : in Asis.Element;Specifies the entity that should be queried. The name must be of the following kinds:
Context : in Asis.Element;Specifies the context for the query.
return Boolean;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
Function Is_Static
function Is_Static (Expression : in Asis.Expression) return Boolean;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
Expression : in Asis.Expression;Specifies the expression that should be queried. The expression must be of the following kind:
Element_Kinds
An_Expression
return Boolean;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
- "Processing Static and Universal Expressions"
- Ada83 LRM 4.9, Ada95 LRM
4.9
Function Is_Universal
function Is_Universal (Expression : in Asis.Expression) return Boolean;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
Expression : in Asis.Expression;Specifies the expression that should be queried. The expression must be of the following kind:
Element_Kinds
An_Expression
return Boolean;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
- "Processing Static and Universal Expressions"
- Ada83 LRM 4.10, Ada95 LRM
4.9.1
Function Kind
function Kind (Expression : in Asis.Expression) return Expression_Kinds;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
Expression : in Asis.Expression;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
return Expression_Kinds;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
Rational Software Corporation
http://www.rational.com support@rational.com techpubs@rational.com Copyright © 1993-2001, Rational Software Corporation. All rights reserved. |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |