DocAda(tm) is a productivity tool of KSCE

____ | Up | ____ | Back | Forward
About DocAda Light: Preface / Preliminary / Help / TOC / Copyright
DocAda Online at the Ada Home: Complete RM95 / Updates / News

6.4.1 Parameter Associations

A parameter association defines the association between an actual parameter and a formal parameter.

Name Resolution Rules

The formal_parameter_selector_name of a parameter_association shall resolve to denote a parameter_specification of the view being called.

The actual parameter is either the explicit_actual_parameter given in a parameter_association for a given formal parameter, or the corresponding default_expression if no parameter_association is given for the formal parameter. The expected type for an actual parameter is the type of the corresponding formal parameter.

If the mode is in, the actual is interpreted as an expression; otherwise, the actual is interpreted only as a name, if possible.

Legality Rules

If the mode is in out or out, the actual shall be a name that denotes a variable.

The type of the actual parameter associated with an access parameter shall be convertible (see 4.6) to its anonymous access type.

Dynamic Semantics

For the evaluation of a parameter_association:

A formal parameter of mode in out or out with discriminants is constrained if either its nominal subtype or the actual parameter is constrained.

After normal completion and leaving of a subprogram, for each in out or out parameter that is passed by copy, the value of the formal parameter is converted to the subtype of the variable given as the actual parameter and assigned to it. These conversions and assignments occur in an arbitrary order.

About DocAda Light: Preface / Preliminary / Help / TOC / Copyright
DocAda Online at the Ada Home: Complete RM95 / Updates / News
____ | Up | ____ | Back | Forward


Copyright © 1994-1997 by Kempe Software Capital Enterprises. All Rights Reserved. For comments on this DocAda(tm) hypertext document, please write to KSCE, at docada@ksce.com