$ "."0 '123'
3
$ "."0 '12'
2
$ "."0 '1'
So far, I follow it.
$ "."0 ''
0 0
$0&"."0 ''
0 0
Now, I don't understand the rationale behind the result. Why should it
suddenly become a 2-dimensional array?
This becomes a problem when I have to "do every" (".&>) on a boxed
array or an empty array(''). Since the resultant arrays are irregular,
I have to put code to treat the exception.
Suppose the following case:
load 'regex'
$".every '[[:digit:]]+' rxall 'asdhrf'
0 0
$".every '[[:digit:]]+' rxall 'asd345hrf2'
2
+/".every '[[:digit:]]+' rxall 'asdhrf'
$+/".every '[[:digit:]]+' rxall 'asdhrf'
0
+/ ".every '[[:digit:]]+' rxall 'asd345hrf2'
347
Because of it, I can't use the nice default of +/ on empty arrays:
+/ ''
0
+/ 0 0$''
And further down, the empty value isn't very useful.
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm