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