Auto-indent in PDSOE is bad on ELSE IF statements

Posted by andrew.may on 10-Jun-2014 08:44

The Auto-Indent in PDSOE seems to be particularly annoying with chained ELSE IF blocks.  Is there anyway to stop this happening? (while still being able to use auto-indent)

Auto indent is really useful for me to help tidy up old legacy code before working on it. The current behaviour makes this less attractive.

e.g. The following code:

DEFINE VARIABLE l  AS LOGICAL NO-UNDO.
DEFINE VARIABLE l2 AS LOGICAL NO-UNDO.
DEFINE VARIABLE l3 AS LOGICAL NO-UNDO.

IF l THEN
DO:
    RUN test1.p.
    RUN test2.p.
END.
ELSE IF l2 THEN
DO:
    RUN test3.p.
    RUN test4.p.
END.
ELSE IF l3 THEN
    RUN test5.p.
ELSE
    RUN test6.p.

... will become ...

DEFINE VARIABLE l  AS LOGICAL NO-UNDO.
DEFINE VARIABLE l2 AS LOGICAL NO-UNDO.
DEFINE VARIABLE l3 AS LOGICAL NO-UNDO.

IF l THEN
DO:
    RUN test1.p.
    RUN test2.p.
END.
ELSE IF l2 THEN
    DO:
        RUN test3.p.
        RUN test4.p.
    END.
    ELSE IF l3 THEN
            RUN test5.p.
        ELSE
            RUN test6.p.

Posted by Swathi Yellavaram on 10-Jun-2014 09:23

Hi Andrew,

There are no customizations available for auto indent functionality. Please report this issue for handling ELSE IF indentation.

Thanks,

Swathi.

All Replies

Posted by Swathi Yellavaram on 10-Jun-2014 09:23

Hi Andrew,

There are no customizations available for auto indent functionality. Please report this issue for handling ELSE IF indentation.

Thanks,

Swathi.

Posted by andrew.may on 10-Jun-2014 11:41

Thanks - I've logged a support case for the issue.

Posted by Thomas Mercer-Hursh on 10-Jun-2014 12:35

You should post it on Ideas as well.

Posted by andrew.may on 12-Jun-2014 06:58
This thread is closed