Re: Wishlist

new topic     » goto parent     » topic index » view thread      » older message » newer message

----- Original Message -----
From: "Tony Bucholtz" <tony_bucholtz at hotmail.com>
To: "EUforum" <EUforum at topica.com>
Subject: RE: Wishlist


> I don't think anyone wants to change the value of the loop variable
> *inside* the loop.

I'd like to. For example, when I'm reading a file and something I read
changes the situation. I might be processing a series of which, at start
time, I can't know the top value.

Or, in your own example,

> sequence seqindex
> seqindex = {3, 5, 10, 21, 22, 40, 45, 50, 63}
> for i = 1 to length(seqindex)
>   seq2process[seqindex[i]] = <something>
> end for

What if <something> included the addition and/or deletion of elements from
sequindex, hence changing its length?

> The suggestion is for an easier way to do this sort of work, eg:
>
> foreach i = {3, 5, 10, 21, 22, 40, 45, 50 ,63}
>   seq2process[i] = <something>
>   ? i
> end foreach
>
> would result in:
>
> 3
> 5
> 10
> 21
> <etc>

An excellent suggestion.

> Besides, any idea for minimizing [..[]] and [][] and suchlike
> syntax for sequences can't be all bad ;)
>
> Regards
> Tony

Anything that results in clearer syntax is bound to be useful.

Gerardo

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu