Raul has explained the likely functionality of the line of code, however the 
beauty of J is that you can easily try these commands in a J session to see 
what they do.

First load the script that defines your application in a J session. This just 
makes sure that all the verbs (functions) & nouns (variables) are defined. Then 
try the command bit by bit.

   NB. This bit is just the path to the file WA_Counties.txt
   PTHLDR,'\Lists\WA_Counties.txt'

   NB. this bit returns the file contents into the session verbatim
   fread PTHLDR,'\Lists\WA_Counties.txt'

   NB. You might want to check its shape
   $ fread PTHLDR,'\Lists\WA_Counties.txt'

   NB. this bit probably parses the file contents
   clipunfmt fread PTHLDR,'\Lists\WA_Counties.txt'

   NB. You might want to check its shape
   $ clipunfmt fread PTHLDR,'\Lists\WA_Counties.txt'

   NB. this bit probably drops the first two lines
   2}. clipunfmt fread PTHLDR,'\Lists\WA_Counties.txt'

> From: Sprague, Webb (OFM)
> 
> Alrighty ... another J question (building on the last very helpful
> answer to my debug question...)
> 
> I can pick out the gist of the following (assign the contents of a file
> to AREAS), but I don't know why we would put a call to clipunfmt in the
> middle, what it would do, or what "2}." means.  (If I were writing it,
> I
> would try AREAS =: fread 'blah').
> 
> AREAS=: 2}. clipunfmt fread PTHLDR,'\Lists\WA_Counties.txt'
> 
> Thanks again (and I hope this is sort of fun for you J aficionados...)
> W
> 
> > -----Original Message-----
> > From: [email protected] [mailto:general-
> > [email protected]] On Behalf Of Devon McCormick
> > Sent: Thursday, March 25, 2010 1:23 PM
> > To: General forum
> > Subject: Re: [Jgeneral] Interpreting debugger output, please help.
> >
> > The first line of the middle window has a line of code that matches
> > what's
> > in your top window and this line is prefixed "toJ[0]" which indicates
> > this
> > is line zero of "toJ".
> >
> > On Thu, Mar 25, 2010 at 3:30 PM, Sprague, Webb (OFM) <
> > [email protected]> wrote:
> >
> > > I run a script after making a change to the input files, and it
> > barfs.  In
> > > my top debugger window I have this message:
> > >
> > > >[0] ((10{a.)"_ I.@(e.&(13{a.))@]} ])@:(#~ -.@((13 10{a.)&E.@,))
> > >
> > > In the middle debugger window I have this message
> > >
> > > domain error
> > > toJ[0] ((10{a.)"_ I.@(e.&(13{a.))@]} ])@:(#~ -.@((13 10{a.)&E.@,))
> > > clipunfmt[0] (<;._2~ e.&(9 10{a.));....@toj
> > > FetchCoContent[395]     bxtab=. clipunfmt fread PTHLDR,str
> > > CountyFcstMain[3] FetchCoContent ''
> > > CoFcstFrm_ok_button[5] CountyFcstMain ''
> > > wdhandler_base_[10]     fn~''
> > >
> > > Note that I cut and paste the top line into my search function in
> the
> > > editor and can't find it, so I am not sure where it is coming from.
> > >
> > > Can someone tell me what this might mean, or give me a hint + a
> > > documentation link?
> > >
> > > Thanks again for help and patience (Henry -- your message about
> > working
> > > directory was exactly what I was after -tx).
> > >
> > > ---
> > > W. Webb Sprague
> > > Forecast Analyst
> > > Office of Financial Management, Forecast Division
> > > GA Bldg., 3rd Floor, 318-K
> > > PO Box 43113
> > > Olympia, WA 98504-3113
> > > Tel:  360-902-0634
> > > Fax:  360-725-5174
> > > [email protected]
> > > http://www.ofm.wa.gov/pop/
> > >
> > >
> > >
> ---------------------------------------------------------------------
> > -
> > > For information about J forums see
> > http://www.jsoftware.com/forums.htm
> > >
> >
> >
> >
> > --
> > 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
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to