![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Function Is_Private
function Is_Private (Declaration : in Asis.Declaration) return Boolean;Expanded Name Asis.Declarations.Is_Private
Returns a Boolean value indicating whether the specified declaration is a private type or has been derived from a private type.
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:
derived_type_definition ::= new
subtype_indicationPrivate-type declarations are defined by the following syntax:
private_type_declaration ::=
type identifier [discriminant_part] is
[limited] private;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 private-type declaration, a derived-type definition of a private-type declaration, a private-type declaration, a private-type declaration of a generic-parameter declaration, or a record or array with components of a private type.
Parameters
Declaration : in Asis.Declaration;Specifies the declaration to be checked to determine whether it represents a private-type declaration. This function returns True for the following kind
s:
return Boolean;Returns True for the following declaration kinds and False for all others:
- A_Private_Type_Declaration
- A_Generic_Formal_Private_Type_Declaration
- A type or subtype derived from a private type
- A record or array with components of a private type
Errors
Examples
Cross-References
- function Corresponding_Type_Declaration
- function Discriminants
- function Is_Discriminated
- function Is_Limited
- function Is_Type_Declaration
- function Type_Declaration_Definition
- "Processing Incomplete- and Private-Type Declarations"
- Ada83 LRM 3.3.2, Ada95 LRM 3.2.2
- Ada83 LRM 3.4, Ada95 LRM 3.4
- Ada83 LRM 7.4, Ada95 LRM 7.3
- Ada83 LRM 12.1, Ada95 LRM 12.1
Function Is_Procedure
function Is_Procedure (Declaration : in Asis.Declaration) return Boolean;Expanded Name Asis.Declarations.Is_Procedure
Returns a Boolean value indicating whether the specified declaration is a procedure specification or body.
Description
Subprogram specifications are partially defined by the following syntax:
subprogram_specification ::=
procedure identifier [formal_part]
| function designator [formal_part]
return type_markEvery subprogram specification must have an associated subprogram body.
Renaming clauses are defined by the following syntax:
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_specificationGeneric 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_nameThis function returns True if the specified declaration is a procedure subprogram specification, a renaming declaration of a procedure, a procedure body stub, a procedure proper body of a subunit, a generic specification of a procedure subprogram specification, or a generic instantiation of a procedure.
Parameters
Declaration : in Asis.Declaration;Specifies the declaration to checked to determine whether it is a procedure declaration. This function returns True for the following kinds:
return Boolean;Returns True for all elements in the above table and False for all other elements.
Errors
Examples
Cross-References
- function Corresponding_Body
- function Corresponding_Specification
- function Is_Function
- function Is_Package
- function Is_Specification
- function Is_Subprogram
- function Is_Task
- "Processing Program Units"
- Ada83 LRM 6.1, Ada95 LRM 6.1
- Ada83 LRM 8.5, Ada95 LRM 8.5
- Ada83 LRM 10.2, Ada95 LRM 10.1.3
- Ada83 LRM 12.1, Ada95 LRM 12.1
- Ada83 LRM 12.3, Ada95 LRM 12.3
Function Is_Renaming_Declaration
function Is_Renaming_Declaration (Declaration : in Asis.Declaration) return Boolean;Expanded Name Asis.Declarations.Is_Renaming_Declaration
Returns a Boolean value indicating whether the specified declaration is an object, exception, package, or subprogram or entry renaming declaration.
Description
Renaming clauses are defined by the following syntax:
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;This function returns True if the specified declaration is a renaming declaration.
Parameters
Declaration : in Asis.Declaration;Specifies the declaration to be checked to determine whether it is a renaming declaration. This function returns True for the following kinds:
Element_Kinds Declaration_Kinds
A_Declaration An_Exception_Rename_Declaration
A_Function_Rename_Declaration
An_Object_Rename_Declaration
A_Package_Rename_Declaration
A_Procedure_Rename_Declaration
return Boolean;Returns True for all elements in the above table and False for all other elements.
Errors
Examples
Cross-References
- "Processing Renaming Declarations"
- Ada83 LRM 8.3, Ada95 LRM 8.5
Function Is_Specification
function Is_Specification (Declaration : in Asis.Declaration) return Boolean;Expanded Name Asis.Declarations.Is_Specification
Returns a Boolean value indicating whether the specified declaration is a function, procedure, package, or task specification.
Description
Subprogram specifications are partially defined by the following syntax:
subprogram_specification ::=
procedure identifier [formal_part]
| function designator [formal_part]
return type_markPackage specifications are defined by the following syntax:
package_specification ::=
package identifier is
{basic_declarative_item}
[private
{basic_declarative_item}]
end [package_simple_name]Renaming clauses are defined by the following syntax:
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;Task specifications are defined by the following syntax:
task_specification ::=
task [type] identifier [is
{entry_declaration}
{representation_clause}
end [task_simple_name}]Task-entry declarations are defined by the following syntax:
entry_declaration ::=
entry identifier [(discrete_range)]
[formal_part];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_nameThis function returns True if the specified declaration is for a subprogram specification, package specification, renaming declaration of a package or subprogram, task specification or task-type specification, entry declaration, or a generic
instantiation.Generic instantiations return True because the instantiation creates an implicit specification and body.
Parameters
Declaration : in Asis.Declaration;Specifies the declaration to be checked to determine whether it is a specification. This function returns True for the following kinds:
return Boolean;Returns True for all elements in the above table and False for all other elements.
Errors
Examples
Cross-References
- function Corresponding_Body
- function Corresponding_Specification
- function Is_Function
- function Is_Package
- function Is_Procedure
- function Is_Subprogram
- function Is_Task
- "Processing Program Units"
- Ada83 LRM 6.1, Ada95 LRM 6.1
- Ada83 LRM 7.1, Ada95 LRM 7.1
- Ada83 LRM 8.5, Ada95 LRM 8.5
- Ada83 LRM 9.1, Ada95 LRM 9.1
- Ada83 LRM 9.5, Ada95 LRM 9.5
- Ada83 LRM 12.3, Ada95 LRM 12.3
Function Is_Subprogram
function Is_Subprogram (Declaration : in Asis.Declaration) return Boolean;Expanded Name Asis.Declarations.Is_Subprogram
Returns a Boolean value indicating whether the specified declaration is a subprogram specification, body, generic, instantiation, or rename.
Description
This function returns True if the Is_Function or Is_Procedure functions return True with the same declaration.
Parameters
Declaration : in Asis.Declaration;Specifies the declaration to be checked to determine whether it is a subprogram declaration. This function returns True for the following kinds:
return Boolean;Returns True for all elements in the above table and False for all other elements.
Errors
Examples
Cross-References
- function Corresponding_Body
- function Corresponding_Specification
- function Is_Function
- function Is_Procedure
Function Is_Subunit
function Is_Subunit (Declaration : in Asis.Declaration) return Boolean;Expanded Name Asis.Declarations.Is_Subunit
Returns a Boolean value indicating whether the specified declaration is a subunit.
Description
Subunits are defined by the following syntax:
subunit ::=
separate (parent_unit_name) proper bodyThis function returns True if the specified declaration represents a subunit.
Parameters
Declaration : in Asis.Declaration;Specifies the declaration for which the subunit status should be returned. This function returns True for the following kinds
Element_Kinds Declaration_Kinds
A_Declaration A_Function_Body_Declaration
A_Package_Body_Declaration
A_Procedure_Body_Declaration
A_Task_Body_Declaration
return Boolean;Returns True for all elements in the above table that are also a subunit declaration and False for all other elements.
Errors
Examples
package body Sorting is procedure Quick_Sort (...) is separate;end Sorting;
separate (Sorting)procedure Quick_Sort (...) is ...The element that represents the separate procedure declaration in the body of package Sorting is a Declaration_Kinds of A_Procedure_Body_Stub. When Is_Subunit is called with this element, it returns True.
Cross-References
- "Processing Body Stubs and Subunits"
- Ada83 LRM 10.2, Ada95 LRM 10.1.3
Function Is_Task
function Is_Task (Declaration : in Asis.Declaration) return Boolean;Expanded Name Asis.Declarations.Is_Task
Returns a Boolean value indicating whether the specified declaration is a task specification or task body.
Description
Task specifications are defined by the following syntax:
task_specification ::=
task [type] identifier [is
{entry_declaration}
{representation_clause}
end [task_simple_name}]Each task specification must have a corresponding task body.
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;This function returns True if the specified declaration represents a task specification, task-type task specification, task-body declaration, or task body-stub declaration.
Parameters
Declaration : in Asis.Declaration;Specifies the declaration to be checked to determine whether it is a task declaration. This function returns True for the following kinds:
Element_Kinds Declaration_Kinds
A_Declaration A_Task_Body_Declaration
A_Task_Body_Stub
A_Task_Declaration
A_Task_Type_Declaration
return Boolean;Returns True for all elements in the above table and False for all other elements.
Errors
Examples
Cross-References
- function Corresponding_Body
- function Corresponding_Specification
- function Is_Function
- function Is_Package
- function Is_Procedure
- function Is_Specification
- function Is_Subprogram
Function Is_Type_Declaration
function Is_Type_Declaration (Declaration : in Asis.Declaration) return Boolean;Expanded Name Asis.Declarations.Is_Type_Declaration
Returns a Boolean value indicating whether the specified declaration is a type or subtype declaration.
Description
Type declarations are partially defined by the following syntax:
Ada83 LRM 3.3.1, Ada95 LRM 3.2.1
full_type_declaration ::=
type identifier [discriminant_part] is
type_definition;Ada83 LRM 3.3.2, Ada95 LRM 3.2.2
subtype_declaration ::=
subtype identifier is subtype_indication;Ada83 LRM 3.8.1, Ada95 LRM 3.10.1
incomplete_type_declaration ::=
type identifier [discriminant_part];private_type_declaration ::=
type identifier [discriminant_part] is
[limited] private;Task specifications are defined by the following syntax:
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 full-type declaration, subtype declaration, incomplete-type declaration, private-type declaration, task specification that identifies a task type, or generic-formal or private-type declaration.
Parameters
Declaration : in Asis.Declaration;Specifies the declaration to be checked to determine whether it represents a type declaration. This function returns True for the following kind
s:
return Boolean;Returns True for all elements in the above table and False for all other elements.
Errors
Examples
Cross-References
- function Corresponding_Type_Declaration
- function Discriminants
- function Is_Discriminated
- function Is_Limited
- function Is_Private
- function Type_Declaration_Definition
- "Processing Incomplete- and Private-Type Declarations"
- Ada83 LRM 3.3.1, Ada95 LRM 3.2.1
- Ada83 LRM 3.3.2, Ada95 LRM 3.2.2
- Ada83 LRM 3.8.1, Ada95 LRM 3.10.1
- Ada83 LRM 7.4, Ada95 LRM 7.3
- Ada83 LRM 9.1, Ada95 LRM 9.1
- Ada83 LRM 12.1, Ada95 LRM 12.1
Function Is_Variable
function Is_Variable (Declaration : in Asis.Declaration) return Boolean;Expanded Name Asis.Declarations.Is_Variable
Returns a Boolean value indicating whether the specified declaration is a variable, discriminant, component, or variable subprogram parameter or a renames of one of these items.
Description
The following declarations represent variables:
- Variable (Ada83 LRM 3.2, Ada95 LRM 3.3), discriminant (
Ada83 LRM 3.7.1, Ada95 LRM 3.7), and component declarations (Ada83 LRM 3.7, Ada95 LRM 3.8)- Subprogram and generic formal objects with a Parameter-
, Ada95 LRM 6.2)
_Mode_Kinds of An_In_Out_Mode or An_Out_Mode (Ada83 LRM 6.2- A rename of a variable (Ada83 LRM 8.5, Ada95 LRM 8.5)
Parameters
Declaration : in Asis.Declaration;Specifies the object declaration to be checked to determine whether it is a constant. This function returns True for the following kind
s:
return Boolean;Returns True for all elements in the above table or for An-
_Object_Rename_Declaration that references a variable, and False for all other elements.Errors
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. |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |