On Thu, Mar 25, 2010 at 5:24 PM, Sprague, Webb (OFM) <[email protected]> wrote: > 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'
I do not have clipunfmt defined in my current J session. When I look, I see definitions for this name in several different places: addons/tables/excel/excel.ijs system/classes/grid/jzgrid.ijs system/examples/ole/excel/xlutil.ijs system/main/format.ijs I did not look at all of those definitions and they might be different. I did look at the format.ijs definition, and it looks plausible. I think clipunfmt takes raw text and breaks it into rows and columns (where a row was a line and a columns were tab separated). You could try it to see how it works. Meanwhile, the expression: 2 }. y drops the first to items from y and returns the rest. So, if I understand properly, that line of code was reading the file, doing some basic parsing on it, and then discarding the part that would correspond to the first two lines of the file. -- Raul ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
