startfold-endfold problem

Even if I add startfold and endfold to my code to assign a border to the fold operation, Toad doesn’t treat the specified part correctly. The folded code is beyond /endfold/ keyword.

Here is an example:

DECLARE
v_dummy VARCHAR2 (1);

/startfold/
FUNCTION is_proc_runable (
param1 IN table_01%ROWTYPE,
param2 IN table_01.id%TYPE,
param3 IN table_01.clccid%TYPE DEFAULT NULL)
RETURN BOOLEAN
IS
b__return BOOLEAN := FALSE;
BEGIN
$IF $$prezaras_auto_srv__002 $THEN
log_eszk.add__cloblog ('b__return: ’ ||
CASE
WHEN b__return THEN ‘true’
ELSE ‘false’
END,
v_log);
$END
RETURN b__return;
END is_proc_runable;
/endfold/

BEGIN
dbms_output.put_line (‘Sample text’);
END;
/

Thanks, Tamas. It’s been logged.

The conditional compilation is throwing it off.

Michael,

I don’t think so. I think it should be the CASE statement. There is a bug in folding CASE statement in some situations since the Editor has been replaced to Scintilla. I think I drop a post about it in the 12.7 beta cycle, and this is a known issue.

If I delete the $IF and $END rows the folding still generates error.

Tamas

Try to replace the log_eszk.add__cloblog call with a NULL; statement, and it works perfectly.

Ah yes, you’re right.