Thank you, Dan, works fine. Did you do any timing on the "twice as fast"
?...   :-)

On 4/24/06, Dan Bron <[EMAIL PROTECTED]> wrote:
>
> Gerald,
>
> The new version of  charsub  didn't expect arrays of greater than rank
> 1.  You can use  ($@:] $ (charsub ,))  instead.  Or use this version of
> charsub, which is twice as fast anyway (it exploits syntax which the
> interpreter recognizes & optimizes):
>
> cs =: dyad define
>    NB. y =. (l=#f) } y ,:~ (t,'?') {~ l=.y i."1 0~ > {. 'f t'=.|:_2]\x
>    'f t' =.  |: _2 ]\ x
>    l     =.  f i."1 0 y
>    x     =.  l { t,'?'
>    c     =.  l = #f
>    y     =.  c } x ,: y
> )
>
>
> -Dan
>
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
>



--
Gerald Mylog
Sophienstrasse 58
D-60487 Frankfurt / Main
Tel +49 (0)69 77 06 20 59
Mob +49 (0)179 99 209 43
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to