Specifying procedure or function parameters Positional notation : Parameters « Function Procedure Packages « Oracle PL/SQL Tutorial






SQL>
SQL>
SQL> CREATE OR REPLACE PROCEDURE show_line(ip_line_length IN NUMBER,ip_separator IN VARCHAR2)
  2  IS
  3
  4    myString VARCHAR2(150);
  5
  6  BEGIN
  7
  8    FOR idx in 1..ip_line_length LOOP
  9
 10      myString := myString || ip_separator;
 11
 12    END LOOP;
 13
 14    DBMS_OUTPUT.PUT_LINE(myString);
 15
 16  EXCEPTION WHEN OTHERS THEN
 17
 18    dbms_output.put_line(SQLERRM);
 19
 20  END;
 21  /

Procedure created.

SQL>
SQL>
SQL>
SQL> DECLARE
  2    v_length NUMBER :=50;
  3
  4    v_separator VARCHAR2(1):='=';
  5
  6  BEGIN
  7
  8    show_line(v_length,v_separator);
  9
 10  END;
 11  /








27.14.Parameters
27.14.1.Defining Formal Parameters
27.14.2.There are three types of formal parameters in subprograms: IN, OUT, and IN OUT.
27.14.3.Define function with NUMBER type parameter
27.14.4.Function without parameter
27.14.5.Use IF/ELSIF/ELSE to verify the input parameter
27.14.6.Use ROWTYPE as the parameter
27.14.7.Passing parameters to procedures
27.14.8.Using Named Notation
27.14.9.Use mixed notation to avoid the second parameter, but keep the first and third
27.14.10.Parameter Modes
27.14.11.Positional Notation
27.14.12.Positional vs. named parameter passing.
27.14.13.Parameter Default Values
27.14.14.Specifying procedure or function parameters Positional notation
27.14.15.Table collection type parameter
27.14.16.Mixed Name and Position Notation Calls