Re: CodeXpert - why reports to declare VARIALBE as deep as possible?

Andre Vergison <[email protected]>
Newsgroups gmane.comp.db.oracle.toad.free
Message-ID <14244076.76251334777735031.JavaMail.SYSTEM@alvqcfw02>
 Message from: avergison 

Just as the other example you posted (see my reply in that thread) this is a bug due to old CodeXpert code.

Thanks,
Andre


_______________________________________

Historical Messages 


Author: Andre Vergison
Date: Wed Apr 18 12:35:04 PDT 2012
Just as the other example you posted (see my reply in that thread) this is a bug due to old CodeXpert code.

Thanks,
Andre

__

Author: Andreas Schmid
Date: Tue Apr 10 04:26:05 PDT 2012
Can anyone tell me if the above described problem still occurs the newest version (11.0) by using the provided code example?

Many thanks ...

__

Author: Andreas Schmid
Date: Wed Apr 04 08:51:16 PDT 2012
CodeXpert reports me &quot; Variable - Ensure item is defined in as deep a scope as possible&quot; for &quot;tperson&quot; in the simple example below. Is this a bug and if yes, where can I open a bug issue?

{code}
CREATE OR REPLACE PACKAGE UNUSED_OBJECT_EXAMPLE
AS
&nbsp;&nbsp; TYPE tperson IS RECORD (
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; person_id&nbsp;&nbsp;&nbsp;&nbsp; T_PERSON.PERSON_ID%TYPE,
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; person_type&nbsp;&nbsp; T_PERSON.PERSON_TYPE%TYPE
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; );

&nbsp;&nbsp; PROCEDURE PROC_USE1 (in_person IN tperson);

&nbsp;&nbsp; PROCEDURE PROC_USE2;
END UNUSED_OBJECT_EXAMPLE;
/

CREATE OR REPLACE PACKAGE BODY UNUSED_OBJECT_EXAMPLE
AS
&nbsp;&nbsp; PROCEDURE PROC_USE1 (in_person IN tperson)
&nbsp;&nbsp; IS
&nbsp;&nbsp; BEGIN
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; IF in_person.person_id IS NOT NULL
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; THEN
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; NULL;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; END IF;
&nbsp;&nbsp; END PROC_USE1;

&nbsp;&nbsp; PROCEDURE PROC_USE2
&nbsp;&nbsp; IS
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; person&nbsp;&nbsp; tperson;
&nbsp;&nbsp; BEGIN
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; person := NULL;
&nbsp;&nbsp; END PROC_USE2;
END UNUSED_OBJECT_EXAMPLE;
/
{code}

I am using Toad 9.7.2.5.

Thank you for your help ...

__
_______________________________________
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.