TOC PREV NEXT INDEX DOC LIST MASTER INDEX




Function Is_Initialized

Expanded Name Asis.Declarations.Is_Initialized

Returns a Boolean value indicating whether the specified declaration has an explicit initialization.

Description

Object and number declarations are partially defined by the following syntax:

Ada83 LRM 3.2, Ada95 LRM 3.3

 object_declaration ::=
   identifier_list :
    [constant] subtype_indication
     [:= expression];
  | identifier_list :
    [constant] constrained_array_definition
     [:= expression];

 number_declaration ::=
   identifier_list : constant :=
    universal_static_expression;

Record-component declarations are defined by the following syntax:

Ada83 LRM 3.7, Ada95 LRM 3.8

 component_declaration ::=
  identifier_list :
   component_subtype_definition
    [:= expression];

Discriminant specifications for type declarations are defined by the following syntax:

Ada83 LRM 3.7.1, Ada95 LRM 3.7

 discriminant_specification ::=
  identifier_list : type_mark [:= expression]

Parameter specifications for subprogram declarations are defined by the following syntax:

Ada83 LRM 6.1, Ada95 LRM 6.1

 parameter_specification ::=
  identifier_list : mode type_mark
   [:= expression]

Deferred constants are defined by the following syntax:

Ada83 LRM 7.4, Ada95 LRM 7.3

 deferred_constant_declaration ::=
  identifier_list : constant type_mark;

Generic-parameter declarations are partially defined by the following syntax:

Ada83 LRM 12.1, Ada95 LRM 12.1

 generic_parameter_declaration ::=
   identifier list : [in [out]] type_mark
    [:= expression]

  | type identifier is     generic_type_definition;
  | private_type_declaration
  | with subprogram_specification [is name];
  | with subprogram_specification [is <>];

This function returns True if the specified declaration represents an object declaration, number declaration, deferred-constant declaration, component declaration, discriminant specification, parameter specification, or generic-parameter declaration that includes a default expression.

Parameters

Specifies the declaration for which the initialization status should be returned. This function returns True for the following kinds:
Element_Kinds
Declaration_Kinds
A_Declaration
A_Component_Declaration
A_Constant_Declaration
A_Discriminant_Specification
A_Generic_Formal_Object_Declaration
Parameter_Mode_Kinds
A_Default_In_Mode
An_In_Mode
A_Parameter_Specification
Parameter_Mode_Kinds
A_Default_In_Mode
An_In_Mode
A_Real_Number_Declaration
An_Integer_Number_Declaration

Returns True for all elements in the above tables that have an initial-value expression.

Errors

None.

Examples

Cross-References

Related subprograms:

Related concepts:


Function Is_Limited

Expanded Name Asis.Declarations.Is_Limited

Returns a Boolean value indicating whether the specified declaration is a limited private type, has been derived from a limited private type, or is a task-type declaration.

Description

Subtype declarations are partially defined by the following syntax:

Ada83 LRM 3.3.2, Ada95 LRM 3.2.2

 subtype_declaration ::=
  subtype identifier is subtype_indication;

Derived types are defined by the following syntax:

Ada83 LRM 3.4, Ada95 LRM 3.4

 derived_type_definition ::= new
  subtype_indication

Private type declarations are defined by the following syntax:

Ada83 LRM 7.4, Ada95 LRM 7.3

 private_type_declaration ::=
  type identifier [discriminant_part] is
   [limited] private;

Task specifications are defined by the following syntax:

Ada83 LRM 9.1, Ada95 LRM 9.1

 task_specification ::=
  task [type] identifier [is
   {entry_declaration}
   {representation_clause}
  end [task_simple_name}]

Generic package and subprogram specifications are partially defined by the following syntax:

Ada83 LRM 12.1, Ada95 LRM 12.1 

generic_parameter_declaration ::=
   identifier list : [in [out]] type_mark
    [:= expression]

  | type identifier is     generic_type_definition;
  | private_type_declaration
  | with subprogram_specification [is name];
  | with subprogram_specification [is <>];

This function returns True if the specified declaration is a subtype declaration of a limited private-type declaration, a derived-type definition of a limited private-type declaration, a limited private-type declaration, a task-type declaration, a limited private-type declaration of a generic-parameter declaration, or a record or array with components of a limited private type.

Parameters

Specifies the declaration to be checked to determine whether it represents a limited private-type declaration. This function returns True for the following kind
Element_Kinds
Declaration_Kinds
A_Declaration
A_Full_Type_Declaration
A_Generic_Formal_Private_Type-
_Declaration
A_Generic_Formal_Type_Declaration
A_Private_Type_Declaration
A_Subtype_Declaration
A_Task_Type_Declaration
An_Incomplete_Type_Declaration

s:

Returns True for the following declaration kinds and False for all others:

Errors

None.

Examples

Cross-References

Related subprograms:

Related concepts:


Function Is_Operator_Definition

Expanded Name Asis.Declarations.Is_Operator_Definition

Returns a Boolean value indicating whether the specified declaration is an operator-symbol function.

Description

Subprogram specifications are partially defined by the following syntax:

Ada83 LRM 6.1, Ada95 LRM 6.1 

subprogram_specification ::=
   procedure identifier [formal_part]
  | function designator [formal_part]
    return type_mark

 designator ::= identifier | operator_symbol

 operator_symbol ::= literal_string

This function returns True if the specified declaration represents a designator that is an operator symbol.

The kind of the operator defined by the declaration can be obtained from Expressions.Operator_Kind.

Parameters

Specifies the declaration to be checked to determine whether it represents an operator symbol. This function returns True for the following kinds
Element_Kinds
Declaration_Kinds
A_Declaration
A_Generic_Formal_Function_Declaration
A_Generic_Function_Declaration
A_Function_Body_Declaration
A_Function_Declaration
A_Function_Instantiation
A_Function_Rename_Declaration

:

Returns True for all elements in the above table that are also operators and False for all other elements.

Errors

None.

Examples

For example:

The Is_Operator_Definition function returns True when given the declaration or body stub for the above function.

Cross-References

Related subprograms:

Related concepts:


Function Is_Package

Expanded Name Asis.Declarations.Is_Package

Returns a Boolean value indicating whether the specified declaration is a package declaration.

Description

Package specifications are defined by the following syntax and can also have a corresponding package body:

Ada83 LRM 7.1, Ada95 LRM 7.1

 package_specification ::=
  package identifier is
   {basic_declarative_item}
  [private
    {basic_declarative_item}]
  end [package_simple_name]

Renaming clauses are defined by the following syntax:

Ada83 LRM 8.5, Ada95 LRM 8.5

 renaming_declaration ::=
   identifier : type_mark renames
    object_name;
  | identifier : exception renames
    exception_name;
  | package identifier renames package_name;
  | subprogram_specification renames
    subprogram_or_entry_name;

Body stubs are defined by the following syntax:

Ada83 LRM 10.2, Ada95 LRM 10.1.3 

body_stub ::=
   subprogram_specification is separate;
  | package body package_simple_name
    is separate;
  | task body task_simple_name is separate;

Generic package and subprogram specifications are partially defined by the following syntax:

Ada83 LRM 12.1, Ada95 LRM 12.1

generic_specification ::=
   generic_formal_part
    subprogram_specification
  | generic_formal_part package_specification

Generic instantiations are partially defined by the following syntax:

Ada83 LRM 12.3, Ada95 LRM 12.3 

generic_instantiation ::=
   package identifier is
    new generic_package_name
     [generic_actual_part];
  | procedure identifier is
    new generic_procedure_name
     [generic_actual_part];
  | function designator is
    new generic_function_name
     [generic_actual_part];
  | function designator is
    new generic_function_name

This function returns True if the specified element is a package specification, a renaming declaration of a package, a body stub or subunit of a package, a generic specification of a package, or a generic instantiation of a package.

Parameters

Specifies the Declaration to be checked to determine whether it is a package declaration. This function returns True for the following kinds:
Element_Kinds
Declaration_Kinds
A_Declaration
A_Generic_Package_Declaration
A_Package_Body_Declaration
A_Package_Body_Stub
A_Package_Declaration
A_Package_Instantiation
A_Package_Rename_Declaration

Returns True for all elements in the above table and False for all other elements.

Errors

None.

Examples

Cross-References

Related subprograms:

Related concepts:


Function Is_Part_Of_Derived

Expanded Name Asis.Declarations.Is_Part_Of_Derived

Returns a Boolean value indicating whether the specified element forms a part of, or is, a derived or implicitly derived subprogram declaration.

Description

The elements that represent the subprograms resulting from a derived-type definition (Ada83 LRM 3.4(12), Ada95 LRM 3.4) test as Is_Part_Of-
_Derived.

The Expressions.Is_Derived function can be used to determine whether an element is a reference to a derived declaration.

Parameters

Specifies the element to be checked.

Returns True if the specified element is part of, or is, a derived or implicitly derived subprogram declaration.

Errors

None.

Examples

Cross-References

Related subprograms:

Related concepts:


Function Is_Part_Of_Implicit

Expanded Name Asis.Declarations.Is_Part_Of_Implicit

Returns a Boolean value indicating whether the specified element forms a part of, or is, an implicitly declared program element.

Description

The following elements are Is_Part_Of_Implicit:

Generic-instance specifications (Ada83 LRM 12.3(17), Ada95 LRM 12.3) are not Is_Part-_Of_Implicit unless they are made so by one of the above definitions. Generic-instance specifications are Is_Part_Of_Instance.

Parameters

Specifies the element to be checked.

Returns True if the specified element forms a part of, or is, an implicitly declared program element. Returns False if the element represents something that exists in the source code.

Errors

None.

Examples

Cross-References

Related subprograms:

Related concepts:


Function Is_Part_Of_Instance

Expanded Name Asis.Declarations.Is_Part_Of_Instance

Returns a Boolean value indicating whether the specified element is part of an implicit generic-specification instance or implicit generic-body instance.

Description

Instantiations are not themselves Is_Part_Of_Instance unless they are encountered while traversing a generic instance.

Parameters

Specifies the element to be checked.

Returns True if the specified element is part of an implicit generic-specification instance or implicit generic-body instance.

Errors

None.

Examples

Cross-References

Related subprograms:

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