From: | Rolf Max Rotvel |
Date: | 7 Apr 2001 at 21:33:03 |
Subject: | Re: One too much... |
Hi Neil Bothwick. You wrote:
> Another solution is
>
> call open(file,...)
> x = readln(file)
> while not eof(file)
> /* do stuff */
> x = readln(file)
> end
>
> so the eof test is made immediately after the read. This one works with
> files where blank lines matter, the previous two don't. Or you could use
> the rmh function to read a file into a stem.
I usually use:
if open('tmp', file, 'r')
do forever
line = readln('tmp')
if line = '' then leave
/* do stuff */
end
call close('tmp')
end
else /* Error msg */
This only works on txt files without empty lines though.
Regards
------------------------ Yahoo! Groups Sponsor ---------------------~-~>
Secure your servers with 128-bit SSL encryption!
Grab your copy of VeriSign's FREE Guide,
"Securing Your Web site for Business." Get it now!
http://us.click.yahoo.com/4cW4jC/e.WCAA/bT0EAA/stAVlB/TM
---------------------------------------------------------------------_->
ARexx mailing list - No flames, no overquoting, no crossposting.
Unsubscribe: Blank mail to mailto:arexx-unsubscribe@onelist.com
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/