F45, Is id_null(x) TRUE for unitialized x ?
From: Andy Hardy <aph_at_ahardy.demon.co.uk>
Date: Thu, 20 May 1999 09:26:58 +0100
Message-ID: <aNKEhBASd8Q3EwHe_at_ahardy.demon.co.uk>
Hi,
END my_pack;
Date: Thu, 20 May 1999 09:26:58 +0100
Message-ID: <aNKEhBASd8Q3EwHe_at_ahardy.demon.co.uk>
Hi,
I have a package where a certain procedure is called a number of times. I use an id_null() against a variable of type RecordGroup held in the outer scope.
E.G.
PACKAGE BODY my_pack
IS
PROCEDURE A
IS
PROCEDURE B
IS
v_rg_id RecordGroup;
v_rg_name VARCHAR2(20) := 'my_group';
PROCEDURE C
IS
BEGIN
IF id_null(v_rg_id) THEN
create the group
END IF;
...
END C;
BEGIN
LOOP
use PROCEDURE C
END LOOP;
delete_group(v_rg_id);
END B;
BEGIN
LOOP;
use procedure B
END LOOP;
END A;
END my_pack;
So, the record group has a lifetime within procedure B. Each time that A calls B, I should get a new record group as the scope of the v_rg_id is within B.
But, is my assumption that id_null(v_rg_id) will be true on each entry into procedure B a correct one, or should I really be checking for the group by name?
So far it seems to work OK, but that may just be luck!!
Thoughts?
-- Andy Hardy. PGP key available on request ===============================================================Received on Thu May 20 1999 - 10:26:58 CEST
