If you want to cut on trailing whitespace, you 
should use
   (whitespace_detector f;._2 ])
instead of
   f;._2

At some point in your J programming you should
consult the J reference material, in this case
the dictionary entry on ;.
http://www.jsoftware.com/help/dictionary/d331.htm



----- Original Message -----
From: Terrence Brannon <[EMAIL PROTECTED]>
Date: Monday, May 21, 2007 7:02 am
Subject: Re: [Jprogramming] line-oriented I/O?

> Devon McCormick <devonmcc <at> gmail.com> writes:
> 
> > 
> > "Cut" (;.) applies the left verb - "convert string to number" 
> (0&".) - to
> > the
> > right noun  - the result of "stdin '' " - according to the value 
> of the fret
> > - in this
> > case "_2" means to use the last character in the (vector) noun as
> > the separator = the points at which we cut apart the vector into 
> pieces to
> > feed to the verb.
> 
> Yes, I have been reading on cut in Chapter 17 of "Learning J" - 
>    http://www.rogerstokes.free-online.co.uk/17.htm
> 
> One interesting thing: if this file had a blank line with spaces 
> in it, it would
> try to cut on space instead of CRLF.
> 
> If the last character were a regular expression indicating 
> whitespace, then we
> would have less concern about invisible gremlins b0rking the program.
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to