RE: Code Analysis glitch with nested function

Gregory Liss <[email protected]>
Newsgroups gmane.comp.db.oracle.toad.free
Message-ID <C90E462F0168DA46BCC2DC6AD9059A541064BBDD@ALVMBXW01.prod.quest.corp>
Thanks for the info Kevin.  We'll look at updating the rule to make it a bit smarter.

Greg

From: [email protected] [mailto:[email protected]] On Behalf Of Kevin Angus
Sent: Thursday, October 27, 2011 05:03 AM
To: [email protected]
Subject: [toad] Code Analysis glitch with nested function



Hi all,

TOAD 11.0.0.116

If I have a function that contains a nested function there is an indication that it has broken rule 3803, using more than one return statement in a function's executable section.

For example,

CREATE OR REPLACE FUNCTION f_get_something(p_param_1 varchar2) RETURN varchar2 IS

  FUNCTION f_get_something_else(p_param_2 varchar2) RETURN varchar2 IS
  BEGIN
    RETURN 'x';

  END f_get_something_else;

BEGIN
  RETURN 'y';
  ~~~~~~~~~~

END f_get_something;

In the editor there is a squiggly line under RETURN 'y' referencing rule 3803.

Looks like the RETURN in the nested function is confusing it.

Cheers,

Kevin.
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.