I can also reproduce the problem.  I found the box operation such as
smoutput savedata=: cdir;bdysegs
is sufficient to mutate the value of bdysegs

bdysegs was also mutated after rank 1 reduction: 
 -/"1 bdysegs

Втр, 03 Май 2011, Raul Miller писал(а):
> On Mon, Apr 25, 2011 at 11:31 PM, Arthur Anger <[email protected]> wrote:
> > I think I have seen successive requests for the value of one of these
> > variables
> 
> I can reproduce this problem.
> 
> It's obscured, somewhat by the use of ? in your definition of nreg.
> But nreg will only ever be 1 or 2.  When it is 2, the code fails
> before assigning bdirs.  When it is 1, the problem becomes visible.
> 
> It looks to me as if the value behind bdysegs is sometimes being
> mutilated by the parser.
> 
> Specifically, I had defined:
> cmoutput=: smoutput@,&<
> 
> And then made some changes to your code, including:
> smoutput savedata=: cdir;bdysegs
> 'bdirs' cmoutput bdirs=: (2* * cdir),: - -/"1 bdysegs
> 
> And I would get sessions that had stuff like this in it:
> 
> +---+---+
> |0 2|0 2|
> |   |2 2|
> +---+---+
> +-----+-------------------------------+
> |bdirs|         0                    2|
> |     |_159704896 _9223372036854775807|
> +-----+-------------------------------+
> |index error: csnake
> |   turnal=:0>.(bi    {bturns)*travel*1+sep21
>    savedata
> +---+--------------+
> |0 2|159884768 4096|
> |   |        1    1|
> +---+--------------+
> 
> But when I replaced cmoutput with smoutput@,&< the value in savedata
> matched the double box of numbers displayed just before the index
> error.
> 
> Thus, I am suspecting an uninitialized variable in the C
> implementation of the parser.
> 
> -- 
> Raul
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm

-- 
regards,
====================================================
GPG key 1024D/4434BAB3 2008-08-24
gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to