Re: trace(1) bug
- Posted by Pete Lomax <petelomax at blueyo?der.co?uk> Nov 16, 2007
- 556 views
c.k.lester wrote: > > Pete Lomax wrote: > > c.k.lester wrote: > > > for i = 1 to 10 do -- DO NOT ALLOW > > By the same token should the compiler complain about: > > i=11 > > If not, why one and not the other? > > Why should it complain in the case you present? The point I am making is that it should not. > this would be easy to debug. Easier than a for loop slip-up? > > In my book both mistakes are equally easily made, found and fixed. > > It might not be easily found in the case I presented, especially if the > declaration and assignment were two screens separate from the errant for > loop. Why would the assignment error I presented be any easier to find? > I admit I'm wanting to protect the coder here from making a mistake that > might be hard to debug. This I understand, the question I am posing is whether the existing error message actually gains us any additional protection in practice. The more I think along the lines of "that error message must be there for a reason, it must be doing some good", the less I can quantify what that good really is. Regards, Pete