I can reproduce the crash. A slightly simpler test is
test=:monad define
for_i. <0 do.
i
end.
)

It seems only crash for  boxed value, the following did not crash
test=:monad define
for_i. 0 do.
i
end.
)

IIRC there was change in loop index in j901. The crash only occurs if i is
taken as the result.
This didn't crash
test=:monad define
for_i. <0 do.
i
123
end.
)
or
test=:monad define
for_i. <0 do.
i
end.
123
)


On Mon, Apr 20, 2020 at 5:16 PM Dimitri Georganas <d...@biodys.com> wrote:

> Apologies, another error...when trying different versions and programs
> (jqt, jconsole, j-mode), I mixed up things.
>
> The segmentation fault happens in all cases with,
>
> test=: monad define
> for_i. 'a';'b';'c' do.
>  *i*
> end.
> )
>
>
>
> On Mon, Apr 20, 2020 at 11:00 AM Dimitri Georganas <d...@biodys.com> wrote:
>
> > 901, sorry
> >
> > On Mon, Apr 20, 2020 at 10:59 AM Dimitri Georganas <d...@biodys.com>
> wrote:
> >
> >> Is there something wrong with for_i
> >> <https://code.jsoftware.com/wiki/Vocabulary/fordot>. in 902?
> >>
> >> In 807 this works:
> >>
> >> test=:monad define
> >>
> >> for_i. 'a';'b';'c' do.
> >>
> >> smoutput i
> >>
> >> end.
> >>
> >> )
> >>
> >>
> >> test''
> >>
> >> ┌─┐
> >>
> >> │a│
> >>
> >> └─┘
> >>
> >> ┌─┐
> >>
> >> │b│
> >>
> >> └─┘
> >>
> >> ┌─┐
> >>
> >> │c│
> >>
> >> └─┘
> >>
> >>
> >> In 902 I get a segmentation fault when running test'' - This is Linux, I
> >> haven't run it through gdb yet, but if nobody can reproduce I will give
> it
> >> a try.
> >>
> >>
> >> Best regards,
> >>
> >> Dimitri
> >>
> >>
> >>
> >>
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
>
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to