Note that you don't need to define tblcsv explicitly:
   tblcsv=: ([: <;._1 ','&,);._2
or
   tblcsv=: ([: <;._1 ',' , ]);._2

On Thu, Jan 12, 2012 at 6:29 AM, Tom Szczesny <[email protected]> wrote:
> tested  ......  works . .....  thanks!
>
> On Wed, Jan 11, 2012 at 12:23 PM, R.E. Boss <[email protected]> wrote:
>
>> tblcsv =: 3 : 0
>>  ([: <;._1 ',',]) ;._2 y
>>  )
>> (untested)
>>
>> R.E. Boss
>>
>>
>> > -----Oorspronkelijk bericht-----
>> > Van: [email protected] [mailto:general-
>> > [email protected]] Namens Tom Szczesny
>> > Verzonden: woensdag 11 januari 2012 17:55
>> > Aan: General forum
>> > Onderwerp: Re: [Jgeneral] Data from csv files
>> >
>> > Given
>> >
>> > cutc =: 3 : 0
>> >   < ;._1 ',',y
>> > )
>> >
>> > tblcsv =: 3 : 0
>> >   cutc ;._2 y
>> > )
>> >
>> > tblcsv 1!:1 <'test.csv'
>> >
>> > I assumed that I would be able to represent this as a single definition,
>> > such as
>> >
>> > tblcsv =: 3 : 0
>> >   ( <;._1 ',',) ;._2 y
>> > )
>> >
>> > or
>> >
>> > tblcsv =: 3 : 0
>> >   (( <;._1',',)&) ;._2 y
>> > )
>> >
>> > I've tried several other vaiations, and all result in 'syntax error'.  Am
>> I
>> > missing something, or does the verb applied to each 'cut' interval need
>> to
>> > be defined separately?
>> >
>> > On Mon, Jan 9, 2012 at 5:00 PM, Arthur Anger <[email protected]> wrote:
>> >
>> > > I often use Rank to select sub-arrays from an array:
>> > >  <"0 i. 7
>> > > --Art
>> > > ------------------
>> > > Quoting [email protected]:
>> > > . . .
>> > > > Message: 2
>> > > > Date: Mon, 9 Jan 2012 11:46:24 -0500
>> > > > From: Tom Szczesny <[email protected]>
>> > > > Subject: Re: [Jgeneral] Data from csv files
>> > > > To: General forum <[email protected]>
>> > > > Message-ID:
>> > > >       <CABn7SNYFw2gyAPKcjx1DMLEru97NMTst6zoGx=
>> > > [email protected]>
>> > > > Content-Type: text/plain; charset=ISO-8859-1
>> > > >
>> > > > As mentioned in the dictionary entry for cut:
>> > > > the phrase   u;._2 y     applies the verb u to each interval created
>> by
>> > > cut,
>> > > > where the fret is the last item, and marks the ends of the intervals.
>> > > >
>> > > > What is the notation for applying the "each" concept to a verb
>> > > independent
>> > > > of   cut   ?
>> > > > For example,
>> > > >   <i.7
>> > > > +-------------+
>> > > > |0 1 2 3 4 5 6|
>> > > > +-------------+
>> > > >
>> > > > How do you express
>> > > >    <  each  i.7
>> > > > and get 7 individually boxed items?
>> > > > (I could not find an entry for "each" in the Index, nor in the
>> > > Vocabulary.)
>> > > . . .
>> > > > End of General Digest, Vol 76, Issue 8
>> > > > **************************************
>> > >
>> > > ----------------------------------------------------------------------
>> > > 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
>>
> ----------------------------------------------------------------------
> 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