Fixed for the next release.  Thanks for finding and
reporting this error.

If the result of f;.3 or f;._3 has 0 cells, then f will be
called once to determine what the type of the result 
should be.  For example:

   (3!:0 ; $) 1 ];._3 ''
+-+-+
|2|0|
+-+-+
   (3!:0 ; $) 1 ];._3 (0)$3j4
+--+-+
|16|0|
+--+-+
   foo=: 3 : '3.5 [ 1!:2&2 ''foo called'''
   (3!:0 ; $) 1 foo;._3 (0)$3j4
foo called
+-+-+
|8|0|
+-+-+



----- Original Message -----
From: June Kim <[email protected]>
Date: Thursday, January 14, 2010 11:18
Subject: [Jprogramming] strange behavior in "take"
To: Programming forum <[email protected]>

>    b=.1];._3 ''
>    b
>    ''-:b
> 1
>    (<'')-:b
> 0
>    4{.''
> 
>    4{.b
> +++++
> |||||
> +++++
>    (4{.'')-:4{.b
> 0
> 
> Why is the result of 4{.b boxed here? I think it shouldn't be boxed.
> Is this a bug?
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to