Re: How to call a private package level function

From: Mat Hess <LBMKGKUXJFJU_at_spammotel.com>
Date: Sat, 14 Aug 2004 21:54:55 +0200
Message-ID: <k6rsh0h695kesaulmv76muajjcdpnt4kt8_at_4ax.com>


I figured it out.

If I want a function or a procedure to be private, I just add it to the body of the package. But note: The private function must be declared before any code that calls it!

create or replace package test
is

        FUNCTION MYPUBLICFUNC (parm in integer) return INTEGER; end;
/
create or replace package body test
AS

  • MUST Declare HERE FUNCTION MYPRIVATEFUNC (parm in integer) return integer IS BEGIN RETURN 3*parm; END;
	FUNCTION MYPUBLICFUNC (parm in integer)
	return integer
	IS
	BEGIN
		RETURN test.MYPRIVATEFUNC(parm);
	END;


-- MUST NOT DECARE HERE!!

END; Regards Mat Received on Sat Aug 14 2004 - 21:54:55 CEST

Original text of this message