[This message might be more appropriate to the J-Beta forum but I'm not
subscribed there
and members of this forum may wish to comment on my proposal]

I frequently use the standard library function "split" because I'm often
dealing with tables of  data
having a header row of column titles.  Sometimes, however, I find my code
breaking because there's
a different definition of "split" in the jzplot.ijs file.  This definition
is supposed to be confined to the
coclass 'jzplot' but somehow shadows the stdlib version.

Here's the two definitions:

split=: {. ; }.     NB. from jzplot.ijs
split=: {. ,&< }.   NB. from stdlib.ijs

They work similarly but the jzplot version gives a screwy result for a
matrix of enclosed items,
e.g.

   ]mat=. ('Ticker';'Shares'),2 2$'ABC';123;'XYZ';456
+------+------+
|Ticker|Shares|
+------+------+
|ABC   |123   |
+------+------+
|XYZ   |456   |
+------+------+

   ({. ; }.) mat   NB. jzplot version
+---------------+---------------+
|+------+------+|+------+------+|
||Ticker|Shares|||Ticker|Shares||
|+------+------+|+------+------+|
+---------------+---------------+
|ABC            |123            |
+---------------+---------------+
|XYZ            |456            |
+---------------+---------------+
   ({.,&<}.) mat   NB. stdlib version
+---------------+---------+
|+------+------+|+---+---+|
||Ticker|Shares|||ABC|123||
|+------+------+|+---+---+|
|               ||XYZ|456||
|               |+---+---+|
+---------------+---------+

Unless there's a good reason for them to be different, it would be nice to
replace the jzplot version
with the stdlib one.

--
Devon McCormick
^me^ at acm.
org is my
preferred e-mail
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to