as long as the last line ends with LF, it will cut on LF.
----- Original Message ----
From: Terrence Brannon <[EMAIL PROTECTED]>
To: [email protected]
Sent: Monday, May 21, 2007 10:02:07 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
Get news delivered with the All new Yahoo! Mail. Enjoy RSS feeds right
on your Mail page. Start today at http://mrd.mail.yahoo.com/try_beta?.intl=ca
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm