Re: trace(1) bug

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

CChris wrote:

> Currently, a for loop index should not exist prior ("attempt to redefine i");
> I don't see any problem in changing this so that the loop index shadows
> anything
> with the same name as long as it is alive, except another for loop index.

The current behavior prevents me from accidentally assigning a loop value
to a currently existing variable. I'd like to keep that behavior. For the
other consideration, iterate() would be a good name.

integer i

iterate(i,1,2,<10) do -- (variable,start,step,continue condition)
  ?i -- 1, 3, 5, 7, 9
end iterate
?i  -- 11

That's the general idea.

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

Search



Quick Links

User menu

Not signed in.

Misc Menu