| Explain code [message #632727] |
Wed, 04 February 2015 23:35  |
 |
shumail
Messages: 149 Registered: September 2012 Location: Canada
|
Senior Member |
|
|
Hi All
I'm wondering that if somebody explain the below code:
CREATE OR REPLACE PACKAGE BODY p1ch_pkg
IS
PROCEDURE show_nt
IS
l_index pls_integer := g_nt.FIRST;
BEGIN
-- g_nt:=nt();
-- dbms_output.put_line(11111);
while l_index IS NOT NULL
loop
dbms_output.put_line ('l_index='||l_index || '-' || g_nt (l_index));
l_index := g_nt.NEXT (l_index);
END loop;
END;
END;
I store 1,2,3,4,5 values in g_nt and then call this procedure, the thing that I don't understand is the counter that is l_index := g_nt.NEXT (l_index);.. Can somebody explain me how does this counter works?. Thanks in advance
Lalit : Removed superfluous lines in the end
[Updated on: Thu, 05 February 2015 00:36] by Moderator Report message to a moderator
|
|
|
|
|
|
|
|