Yes, this is a bug in 5!:5 .  The fix is not obvious.
Thanks for finding and reporting this error.



----- Original Message -----
From: Jose Mario Quintana <[email protected]>
Date: Sunday, August 16, 2009 12:23
Subject: [Jprogramming]  Linear Representation Bug?
To: [email protected]

>    lr=. 5!:5 @ <
>      NB. "Linear. The linear representation is a string which, 
> when interpreted, produces the named object."
> 
>    u=. (<('0');0)` 
>    lr'u'
> 0`
>    v=. 0`
>    (<0)u
> +-----+-+
> |+-+-+|0|
> ||0|0|| |
> |+-+-+| |
> +-----+-+
>    (<0)v
> |domain error: v
> |       (<0)v
> 
>    erase'v'
> 1
>    ". 'v=.',lr'u'
>    v
> 0`
> +-+-+
> |0|`|
> +-+-+
> 0`
>    (<0)v
> |domain error: v
> |       (<0)v
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to