Hi Devon,

I just launched J6.02 and loaded 'tables/dsv'.  Chopstring is there.

load 'tables/dsv'
   chopstring
3 : 0
(' ';'""') chopstring y
:
dat=. y
'fd sd'=. 2{. boxopen x
assert. 1 = #fd
if. =/sd do. sd=. (-<:#sd)}.sd   NB. empty, one or two same
else. NB. replace diff start and end delims with single
  s=. {.('|'=fd){ '|`'  NB. choose single sd
  dat=. dat rplc ({.sd);s;({:sd);s
  sd=. s
end.
dat=. dat,fd
b=. dat e. fd
c=. dat e. sd
d=. ~:/\ c                       NB. mask inside sds
fmsk=. b > d                     NB. end of fields
smsk=. (> (0 , }:)) c            NB. first in group of sds
smsk=. -. smsk +. c *. 1|.fmsk   NB. or previous to fd
y=. smsk#y,fd   NB. compress out string delims
fmsk=. 0:^:(,@1: -: ]) smsk#fmsk
fmsk <;._2 y  NB. box
)

Maybe something screwy with your addons?

-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Devon McCormick
Sent: Wednesday, August 10, 2011 3:08 PM
To: J-programming forum
Subject: [Jprogramming] "chopstring" in J6?

Hi All -

last night at NYCJUG, Ken told me about a J-supplied script that
provides
the functionality I'd rolled myself of reading tab-delimited files into
handy 2-D arrays: ~addons/tables/dsv/dsv.ijs.

When attempting to use this in J6, I got a value error because
"chopstring"
is not defined.  In J7, it worked fine as "chopstring" is defined in
"stdlib.ijs".  I couldn't find this function anywhere in J6, so I'm
wondering why it gets used in dsv.  It's possible I've mis-loaded addon
directories between J6 and J7, so does anyone use this in J6?

I notice that the "stdlib" looks very different between the two versions
of
J.

Regards,

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

Reply via email to