array [message #370899] |
Fri, 03 March 2000 18:12 |
ellanjoy
Messages: 1 Registered: March 2000
|
Junior Member |
|
|
I would like to pass an array as an input parameter.
Any help would be appreciated.
CREATE OR REPLACE PACKAGE test_pack is
TYPE num_array IS TABLE OF NUMBER INDEX BY BINARY_INTEGER;
PROCEDURE test_proc (test_array IN num_array);
END test_pack;
CREATE OR REPLACE PACKAGE BODY test_pack AS
PROCEDURE test_proc (test_array IN num_array) IS
BEGIN
dbms_output.put_line(test_array(1));
END test_proc;
END test_pack;
DECLARE
TYPE num_array IS TABLE OF NUMBER INDEX BY BINARY_INTEGER;
n num_array;
i number;
BEGIN
for i in 1..3 loop
n(i):=i;
end loop;
for i in 1..3 loop
dbms_output.put_line(n(i));
end loop;
-- The problem is here. I would like to pass the
-- array n as input parameter
test_pack.test_proc(n);
END;
|
|
|