Parameter-Passing Notation
Formal parameters are the names that are declared in the header of a procedure or function. Actual parameters are the values or expressions placed in the parameter list when a procedure or function is called.
PL/SQL lets you use either of two styles of notation for passing arguments in parameter lists:
- Positional notation
Associates each value in the list of arguments supplied in the program call with the parameter in the corresponding position. This is the default.
- Named notation
Explicitly associates the argument value with its parameter by name, not by position. When you use named notation, you can supply the arguments in any order, and you can skip over IN arguments that have default values.
The call to the empid_to_name procedure is shown here with both types of notation:
BEGIN
-- Implicit positional notation.
empid_to_name(10, surname, first_name);
-- Explicit named notation.
empid_to_name(in_id=>10
,out_last_name=>surname
,out_first_name=>first_name);
END;You can combine positional and named notation. Just make sure that positional arguments appear to the left of any named notation arguments. When calling PL/SQL stored functions from SQL, named notation is not supported.