The problem is that the adverb is being evaluated at (+ Arg), rather than
waiting for a y argument. It appears that execution only waits if both u
and y are present, and 'u' doesn't count because it is a string and not a
variable. This looks like a bug to me.
A simple fix is to place a trivial mention of u in the code. A line
containing only "u" before anything else will do the trick.

Marshall

On Fri, Apr 6, 2012 at 7:53 PM, Paul Jackson <plj...@gmail.com> wrote:

> I was writing some tools for understanding J syntax and order of
> evaluation, when I encountered the following bug.  While I found it on the
> Android port, I've confirmed it occurs in both 32 and 64 bit Windows as
> well.  Just about anything done before the append, avoids the problem.
>
> Paul
>
> Arg=: 1 : 0
> y 1!:3 [2
> (5!:5 <'u') 1!:3 [2
> 0 0$''
> )
>
> Debug 1
> + Arg 'u'
> |value error: y
> | y 1!:3[2
> |Arg[0]
>
> Debug 1
> 10 Arg 'x'
> |value error: y
> | y 1!:3[2
> |Arg[0]
>
> --
> Paul
> ----------------------------------------------------------------------
> 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