Mutually exclusive local subprograms. : Procedure Definition « Stored Procedure Function « Oracle PL / SQL






Mutually exclusive local subprograms.

    
SQL>
SQL> set serveroutput on
SQL>
SQL> DECLARE
  2    v_TempVal BINARY_INTEGER := 5;
  3
  4    PROCEDURE A(p_Counter IN OUT BINARY_INTEGER) IS
  5    BEGIN
  6      DBMS_OUTPUT.PUT_LINE('A(' || p_Counter || ')');
  7      IF p_Counter > 0 THEN
  8        B(p_Counter);
  9        p_Counter := p_Counter - 1;
 10      END IF;
 11    END A;
 12
 13    PROCEDURE B(p_Counter IN OUT BINARY_INTEGER) IS
 14    BEGIN
 15      DBMS_OUTPUT.PUT_LINE('B(' || p_Counter || ')');
 16      p_Counter := p_Counter - 1;
 17      A(p_Counter);
 18    END B;
 19  BEGIN
 20    B(v_TempVal);
 21  END;
 22  /
      B(p_Counter);
      *
ERROR at line 8:
ORA-06550: line 8, column 7:
PLS-00313: 'B' not declared in this scope
ORA-06550: line 8, column 7:
PL/SQL: Statement ignored


SQL>
SQL>

   
    
    
  








Related examples in the same category

1.Creat an empty procedure
2.replace a procedure
3.Create a stored procedure and how to call it.
4.Define procedure to insert data
5.Define and call procedure
6.Create procedure with authid
7.Create a stored procedure with authid
8.A forward declaration.
9.Inner procedure
10.Save calculation result to a table in procedure
11.exception throwed out of the procedure
12.AUTHID clause in a CREATE PROCEDURE statement indicates that this procedure is being created with user's or invoker's rights
13.Increase gift price
14.A local subprogram within a stored procedure
15.Overloaded local procedures: number and varchar2
16.Using all the default values
17.Forward Referencing
18.Mark procedure with authid current_user
19.Reference package variable in a procedure
20.Only manager can change the password