From: | wparker |
Date: | 21 Jan 2000 at 07:37:05 |
Subject: | Re: File-Read |
From: wparker@sprint.ca
Hi Bryan, on Jan 20 you wrote:
> From: "Bryan K. Williams" <icar@evilgeniuses.org>
>
> Hello Donald
>
> On 18-Jan-00, Donald Dalley wrote:
>
> > You have two basic choices: read line by line (READLN);
>
> Just wanted to add here something I found out about ReadLn() the hard
> way. It has a limit of 1,000 characters before it will just truncate. I
> know, what crazy text file has a single line of over 1,000 characters :^)
> It's just something I've never seen in any docs and it can be quite a
> frustrating error to track down.
>
Yes, Arexx also reads more than a line if possible (internaly buffering
the extra chacters for the next call to readln() or readch() ). This can
cause problems at times.
In a shell...
rx "call open(fh,'pipe:a','R');say readln(fh)"
In another shell
copy con: pipe:a
Type a few lines into the con:. Nothing from the rexx command. Close the
con: (ctrl \) and you get the first line.
Bill
BTW some 'special' pipes have a way to overcome this. ;-D
--------------------------- ONElist Sponsor ----------------------------
Independent contractors: Find your next project gig through JobSwarm!
You can even make money by referring friends.
<a href=" http://clickme.onelist.com/ad/jobswarm2 ">Click Here</a>
------------------------------------------------------------------------
ARexx mailing list - No flames, no overquoting, no crossposting. Unsubscribe: Blank mail to mailto:arexx-unsubscribe@onelist.com