Toad World® Forums

Formatter anomaly with conditional compilation


#1

SQL Navigator 6.3.0.1824
Formatter Engine 5.150

PACKAGE BODY packx IS
PROCEDURE p1 IS
BEGIN
IF TRUE THEN
DBMS_OUTPUT.put_line(‘1’);
$IF TRUE $then
ELSE
DBMS_OUTPUT.put_line(‘2’);
$END
END IF;
END p1;

PROCEDURE p2 IS
BEGIN
NULL;
$IF TRUE $THEN
DBMS_OUTPUT.put_line(‘3’);
$END
END p2;
END packx;

16:24:56 ERROR line 19, col 7, ending_line 19, ending_col 8,

16:24:56 Found: ‘p2’

16:24:56 Expecting: ; -or- := -or- . -or- @ -or- ( ROW

When one adds empty_line (or just “null;”)between $END and END P2 it does parse.
Also if unident all code to column 1 (no spaces before commands) - it fails even with added “null;”.
Same problem with SQL Navigator 6.2

After ctrl-r this piece of code gives:


#2

Hi Marko,

Thanks for reporting this issue. We have a new release of the formatter component which has already fixed this. But we cannot include it to SQLNav at the moment. I have create a new thread to provide the new formatter for you to udpate. Please go to the link below to check it out.
http://sqlnavigator.inside.quest.com/thread.jspa?messageID=102867

Thanks,
Vincent