Re: trace(1) bug

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

Andy Drummond wrote:

> My personal preference - if worth anything - is that if a variable
> has been declared when used in a for loop, then that variable is used.
> Then it is in scope after the loop exits.  If no such variable has
> been declared then it is a local to the loop and out of scope as soon
> as the loop exits.  This seems entirely consistent with the normal 
> practise of variable scoping when functions are defined....

Please, no. I want this to be a goof:

integer i
  i = find(x,y) -- i is now 32
  for j = 1 to 10 do
    for k = 1 to 10 do
      for i = 1 to 10 do -- DO NOT ALLOW
         ...
      end for
    end for
  end for

  ?i -- better be 32

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

Search



Quick Links

User menu

Not signed in.

Misc Menu