6.2.6. Formal Parameter CompletionΒΆ

Code Assist can suggest the possible formal parameters of a subprogram call you’re currently writing. For example, the figure below shows a call to a procedure declared as folows:

procedure Send( This_SA  : in out Transceiver'Class;                 This_Msg : in     MS1553.Message.Description;                 Result   :    out Status'Class );

After you type the opening parenthesis, Code Assist will automatically propose a completion consisting of all the formal parameters, as well as proposing each formal as an individual completion. That is the case in the following example:

smart completion of all formal params

Selecting “params of...” inserts all the (remaining) formal parameters using the named parameter association format, and places the cursor where the first actual parameter will go:

smart completion of all formal params inserted

You can, of course, also select an individual formal parameter candidate and it will be inserted next, again using the named association format.

Alternatively, only the remaining formals are proposed if you manually invoke Code Assist in the middle of entering the actual parameters. Thus you can either choose a completion containing all the remaining formal parameters, or individual completions from the remaining formals. Continuing the example, invoking Code Assist after the comma in the following situation:

Send( Xmitter.all,

would cause the completion engine to propose parameters This_Msg and Result but not This_SA, as well as all those remaining:

smart completion of partial formal params

When multiple subprograms are overloaded the parameters for each subprogram are indicated, separated into their corresponding groups. In the following figure there are two procedures named Send. We have selected the formal parameters of the procedure with four formals instead of three:

smart completion of an overloaded unit