create or replace PACKAGE PS_list IS /* Set of exceptions specific to and raised by the package */ list_undefined EXCEPTION; list_full EXCEPTION; out_of_bounds EXCEPTION; /* The number of items currently in the list. */ FUNCTION nitems (list_in IN VARCHAR2) RETURN NUMBER; /* Append an item onto the end of the list. */ PROCEDURE appenditem (list_in IN VARCHAR2, item_in IN VARCHAR2); /* Destroy the list, freeing up associated memory. */ PROCEDURE destroy (list_in IN VARCHAR2); /* Delete the specified item from the list. */ PROCEDURE deleteitem (list_in IN VARCHAR2, item_in IN VARCHAR2); /* Delete the Nth item from the list. */ PROCEDURE deleteitem (list_in IN VARCHAR2, position_in IN NUMBER); /* Get the Nth item from the list. */ FUNCTION getitem (list_in IN VARCHAR2, position_in IN NUMBER) RETURN VARCHAR2; /* Get the position of the specified item in the list. */ FUNCTION getposition (list_in IN VARCHAR2, item_in IN VARCHAR2) RETURN NUMBER; /* Insert an item at the specified position in the list. */ PROCEDURE insertitem (list_in IN VARCHAR2, position_in IN NUMBER, item_in IN VARCHAR2); /* Make a new list of the specified name. */ PROCEDURE make (list_in IN VARCHAR2); /* Insert an item at the first position of the list. */ PROCEDURE prependitem (list_in IN VARCHAR2, item_in IN VARCHAR2); /* Replace the Nth item in the list with the new item. */ PROCEDURE replaceitem (list_in IN VARCHAR2, position_in IN NUMBER, item_in IN VARCHAR2); PROCEDURE display (list_in IN VARCHAR2); END PS_list; /