Skip to content

G-7110: Try to use named notation when calling program units.

Major

Changeability, Maintainability

Reason

Named notation makes sure that changes to the signature of the called program unit do not affect your call.

This is not needed for standard functions like (to_char, to_date, nvl, round, etc.) but should be followed for any other stored object having more than one parameter.

Example (bad)

1
2
3
4
5
6
7
declare
   r_employee employees%rowtype;
   co_id constant employees.employee_id%type := 107;
begin
   employee_api.employee_by_id(r_employee, co_id);
end;
/

Example (good)

1
2
3
4
5
6
7
declare
   r_employee employees%rowtype;
   co_id constant employees.employee_id%type := 107;
begin
   employee_api.employee_by_id(out_row => r_employee, in_employee_id => co_id);
end;
/