Re: scope of variables
- Posted by jaygade Dec 31, 2010
- 2648 views
I think that it should be changed. The current behavior is inconsistent with other languages and unintuitive. One would expect a block started by a loop or an decision block to work the same as a block defined by a procedure or function.
I disagree. If i need a variable, i declare it at the top of the procedure.
I do too. I thought that everyone did. I thought that it was required by the language.
Now if your vote is to remove the feature of declaring variables in blocks other than procedures and functions, then that's valid. I never thought that it was much of a feature anyway.
Gosh, you can declare junk[1..5000] and prolly not run out of nested "decision block" junk[x], and you have the feature that all the junk is available outside that level too.
useless
I don't know what you mean.