Formatting issue

Latest beta x64.

create or replace package body BBB
is
    function FFF(P_DTBEG date, P_DTEND date)
        return F_TAB
        pipelined
        parallel_enable
    is
        L_DTBEG   constant date := trunc(P_DTBEG, 'dd');
        L_DTEND   constant date := least(trunc(P_DTEND, 'dd'), last_day(P_DTBEG));

        L_DTYM    constant SRRO_OPR_ZREPS.ORDERDTYM%type
                               := extract(year from L_DTBEG) * 100 + extract(month from L_DTBEG) ;                -- !!!
    begin
        null;
    end;
end BBB;

After formatting, space was added between “)” and “;”.

create or replace package body BBB
is
    function FFF(P_DTBEG date, P_DTEND date)
        return F_TAB
        pipelined
        parallel_enable
    is
        L_DTBEG   constant date := trunc(P_DTBEG, 'dd');
        L_DTEND   constant date := least(trunc(P_DTEND, 'dd'), last_day(P_DTBEG));

        L_DTYM             SRRO_OPR_ZREPS.ORDERDTYM%type
                               := extract(year from L_DTBEG) * 100 + extract(month from L_DTBEG);                 -- !!!
    begin
        null;
    end;
end BBB;

If you remove “constant”, the space is not added.

FmtPlus.opt

[Qp5FormatterOptions]
Version=397
OutputTabs=4
IndentSize=4
RightMargin=120
LF_SQLOthers=0
KeywordCase=2
VariableCase=1
BuiltInCase=2
BuiltInPackageCase=2
AssignAlignment=2
ParensStyle=0
Tagline=0
DmlColumnAliasAlignment=0
DmlTableRefAliasAlignment=0
InsertTabs=0

Hello Ihor,

Thanks for reporting this one. It’s related to constants indeed, showing up on text folding.
Fixed in the next parser drop - which should make it into Toad.
(QP-4364)

Thanks,
Andre

1 Like

Thank You, @avergison