Re: trace(1) bug

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

c.k.lester wrote:
> 
> 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

By the same token should the compiler complain about:
integer i
   i = find(x,y) -- i is now 32
   for j = 1 to 10 do
     for k = 1 to 10 do
       i=11
     end for
   end for
 
   ?i -- better be 32


If not, why one and not the other?

In my book both mistakes are equally easily made, found and fixed.

Regards,
Pete

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

Search



Quick Links

User menu

Not signed in.

Misc Menu