ARexx (22/77)

From:Neil Bothwick
Date:8 Apr 2001 at 01:07:44
Subject:Re: One too much...

Rolf Max Rotvel said,

> Hi Neil Bothwick. You wrote:

>> > 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.
>>
>> Use iterate instead of leave. It skips empty lines instead of exiting
>> the loop.

> :-) Using iterate in the above loop will make it loop forever.

Oops, I hadn't noticed the "do forever". It needs to use "do until
eof(tmp)" :)

Neil



Neil Bothwick - New Media Editor, Amiga Active Magazine
Connected via Wirenet - http://www.wire.net.uk
The UK's first Amiga-only internet access provider
---
WinErr 006: Malicious error - Desqview found on drive

------------------------ Yahoo! Groups Sponsor ---------------------~-~>
Find software faster. Search more than 20,000
software solutions on KnowledgeStorm. Register
now and get started.
http://us.click.yahoo.com/PabFaA/INSCAA/Jh4EAA/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/