Miller, Raul D wrote:
> Chris Burke wrote:
> 
>>  if. len > #dat do.
>>    if. p > s do.
>>      dat=. dat, LF
>>    else.
>>      'file not in LF-delimited lines' 13!:8[3
> 
> 
> Note that this assumes that the last line of the file is
> terminated by a line feed.  Otherwise, there can be a
> spurious error if the file is slightly larger than an
> even multiple of 1e6.
> 
> At minimum, this assumption should be documented.

This looks OK to me. The line after the if. statement should handle a
file which is not terminated by LF. The line after the else. statement
should handle a file where a line is longer than 1e6 bytes, and so is
inappropriate for this function.


----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to