On Tue, 19 Feb 2019, at 18:01, Rony G. Flatscher wrote:
> do idx over dir counter i
> say "entry #" i": idx="idx "dir[idx]="dir
> end
> >
> where "counter" would be a subkeyword defining a loop variable which
> starts out with "1" and gets increased by one after each loop.
It seems to me that it would be more useful, if you offered two options
do idx over dir firstcount i
say "entry #" i": idx="idx "dir[idx]="dir
end
and
do idx over dir finalcount i
say "entry #" i": idx="idx "dir[idx]="dir
end
where 'firstcount' is incremented as if the first statement in the loop
was i=i+1, and 'finalcount' happened as if it was the final statement.
Then an 'iterate' within the loop would have no effect on a firstcount
counter, but would prevent incrementing of a finalcount one.
Maybe you could even have
do idx over dir firstcount i finalcount j
say...
end
which would be equivalent to
i=0;j=0
do idx over dir
i=i+1
say...
j=j+1
end
--
Jeremy Nicoll - my opinions are my own.
_______________________________________________
Oorexx-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/oorexx-devel