Index | Home | Forums
Oracle PL/SQL Example 2-32 Using Static Constants

Example 2-32 Using Static Constants

CREATE PACKAGE my_debug IS
  debug CONSTANT BOOLEAN := TRUE;
  trace CONSTANT BOOLEAN := TRUE;
END my_debug;
/
CREATE PROCEDURE my_proc1 IS
BEGIN
  $IF my_debug.debug $THEN DBMS_OUTPUT.put_line('Debugging ON'); 
  $ELSE DBMS_OUTPUT.put_line('Debugging OFF'); $END
END my_proc1;
/
CREATE PROCEDURE my_proc2 IS
BEGIN
  $IF my_debug.trace $THEN DBMS_OUTPUT.put_line('Tracing ON'); 
  $ELSE DBMS_OUTPUT.put_line('Tracing OFF'); $END
END my_proc2;
/


This page was created by oracleabc.com on Feb 23,2008 00:09:02
General comments and questions regarding this document should be sent by email to info@oracleabc.com or post your comments here