Arexx (57/67)

From:Neil Bothwick
Date:21 Oct 99 at 23:59:42
Subject:Re: Filenumbering

From: "Neil Bothwick" <neil@wire.net.uk>

Michael Jaccoud said,

> The first part to show what I mean is here (But it makes an endless loop :(
> ):

> DO Nr=1 to 99

> IF (EXISTS('RAM:TEST') = 0)
> THEN ADDRESS COMMAND 'makedir ram:test'
> ELSE ADDRESS COMMAND 'makedir ram:test' || Nr + 1

> EXIT

Aside from the missing END, you are making a directory on each pass
through the loop. It should be something like

nr = 0
do forever
nr = nr + 1
if exists('RAM:Test'nr) then iterate
else do
call makedir('RAM:Test'nr)
leave
end
end

You'll need rexxsupport.library loaded.

Neil



Neil Bothwick - New Media Editor, Amiga Active Magazine
Connected via Wirenet, The UK's first Amiga-only internet access provider
http://www.wire.net.uk


WinErr 011: Window open - Do not look outside

--------------------------- ONElist Sponsor ----------------------------

??? Computer Questions ==> Free Answers From Live Experts ! ! !
go to EXPERTCITY.COM
<a href=" http://clickme.onelist.com/ad/expertcity15 ">Click Here</a>

------------------------------------------------------------------------
ARexx mailing list - No flames, no overquoting, no crossposting. Unsubscribe: Blank mail to mailto:arexx-unsubscribe@onelist.com