Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: PL/SQL Arrays
Richard Kuhler wrote:
> Jeremy wrote:
>
>> Say you have the following: >> >> typecreate or replace package my_util >> is >> type numarray is table of number index by binary_integer; >> procedure wrap >> (p_numbers in numarray); >> end my_util; >> >> You cannot say "numarray default null" so you are obliged to pass at >> least some parameters to procedure "wrap" when you call it. I am sure >> there is a way around this - how should I define things so that I >> don't have to always pass some value?
As soon as I hit send, I realized my solution of course points at another solution if you're willing to have a public global variable ...
empty_numarray numarray;
procedure wrap (p_numbers in numarray := empty_numarray);
I'm not sure I like this solution since anybody could screw with that variable and change the default behavior of that procedure in their session. However, that might actually be desirable in some situations.
-- RichardReceived on Wed Nov 19 2003 - 13:18:47 CST