SQL>
SQL> DECLARE
2 PROCEDURE b (caller VARCHAR2); -- This is a forward referencing stub.
3 PROCEDURE a (caller VARCHAR2) IS
4 procedure_name VARCHAR2(1) := 'A';
5 BEGIN
6 dbms_output.put_line('Procedure "A" called by ['||caller||']');
7 b(procedure_name);
8 END;
9 PROCEDURE b (caller VARCHAR2) IS
10 procedure_name VARCHAR2(1) := 'B';
11 BEGIN
12 dbms_output.put_line('Procedure "B" called by ['||caller||']');
13 END;
14 BEGIN
15 a('Main');
16 END;
17 /
Procedure "A" called by [Main]
Procedure "B" called by [A]
PL/SQL procedure successfully completed.
SQL>
|