Skip to content

Moduleoption inparallel in tform with hidden expressions seems to overwrite them. #856

Description

@dondgray

Hello,

in my setup i start with multiple expressions but only treat one at a time by hiding the respective others, see the attached script. Using Moduleoption inparallel; in this case does not make sense anyways since i only want to handle one active expression at a time, but anyways, in this script it corrupts the results without warning. Since the tmpc are not altered during the loop the final print+s should look like

tmpc1 = c1;
tmpc2 = c2;
tmpc3 = c3;

but instead gives

tmpc1 = c2;
tmpc2 = c2;
tmpc3 = c2;

when calling the program with tform -w2. With normal form the statement Moduleoption inparallel; does nothing and the result is what is expected.

#-
off statistics;

auto s c;

#define NUMCOUPS "3"

#do i=1,`NUMCOUPS'
Local tmpc`i' = c`i';
#enddo
Print+s;
.sort

Hide;
#do cloop=1,`NUMCOUPS'

        #if `cloop' == 1
                NHide tmpc`cloop';
        #else
                UnHide tmpc`cloop';
        #endif
        .sort

        ModuleOption inparallel;
        Print+s;
        .sort

        Hide tmpc`cloop';
#enddo

.sort
Unhide;
Print+s;
.end

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions