Code Listing 3: One way in, one way out—NOT

 1  CREATE OR REPLACE FUNCTION matching_row (
 2     title_list_in IN title_collection_t,
 3     title_in IN VARCHAR2
 4     ) RETURN PLS_INTEGER
 5  IS
 6     l_count PLS_INTEGER;
 7  BEGIN
 8     l_count := title_list_in.COUNT;
 9     FOR indx IN 1 .. l_rowcount
10     LOOP
11        IF title_in = title_list_in(indx)
12        THEN
13           RETURN indx;
14        ELSIF indx IS NULL
15        THEN
16           EXIT;
17        END IF;
18     END LOOP;
19     RETURN NULL;
20  EXCEPTION
21     WHEN Exit_Function THEN RETURN NULL;
22* END;