Shocked with the behaviour of TOAD for Nested IF [message #45998] |
Fri, 30 April 2004 09:04 |
Ajendra
Messages: 165 Registered: February 2004
|
Senior Member |
|
|
A very simple prcedure. When I execute this procedure, nothing is displayed which is as expected. But whn I trace it in TOAD (ver 7.3.0.0. ) by pressing F8 key, to my surprise DBMS_OUTPUT.PUT_LINE('I am shocked'); is getting executed.
Then I changed the code as
IF 1=2 THEN
DBMS_OUTPUT.PUT_LINE('I am shocked');
ELSE
DBMS_OUTPUT.PUT_LINE('Expected');
END IF;
then the tracing is OK. Is that a bug of TOAD or Im wrong somewhere.
CREATE OR REPLACE PROCEDURE TEST IS
BEGIN
IF 1=1 THEN
IF 1=2 THEN
DBMS_OUTPUT.PUT_LINE('I am shocked');
END IF;
ELSE
NULL;
END IF;
END;
|
|
|