Re: foreach

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

What about the ability to edit the list itself?

What happens when you do something like: s = repeat(0,10) for i = 1 to length(s) do s = s[1..$-1] ? i end for

or

for i = 1 to length(s) do s = s[1..$-1] ? i end for

or

foreach value in s do ? value s = s[1..$-1] end foreach

I have had problems doing this kind of thing in the past. I cannot tell you what because it has been so long ago and I convert them to while loops when ever I want to increment the index manually or modify the list in anyway.

P.S.: Quote Reply seems broken now.

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

Search



Quick Links

User menu

Not signed in.

Misc Menu