Code Listing 2: Use of local procedure to hide conditional nesting

 1  CREATE OR REPLACE PROCEDURE process_book_order (book_in in book%ROWTYPE) 
 2  IS
 3     PROCEDURE process_pre_2000_book (book_in in book%ROWTYPE)
 4     IS
 5     BEGIN
 6        IF <another condition> THEN ...
 7        ELSIF <yet another condition> THEN ...
 8        END IF;
 9     END process_pre_2000_book;
10  BEGIN
11     IF book_in.page_count > 1000
12     THEN
13        IF publication_date < TO_DATE ('01-JAN-2000', 'DD-MON-YYYY')
14        THEN
15           process_pre_2000_book (book_in);
16        ELSE
17           ... other logic ...
18        END IF;
19     ELSIF book_in.page_count > 500
20     THEN
21        ... other logic ...
22     END IF;
23* END process_book_order;