Variable declaration reset: Difference between revisions

Content added Content deleted
(actually -- major correction (J))
Line 231: Line 231:
But it would not alter the generated result.
But it would not alter the generated result.


J's control words (like '<tt>while.</tt>') do not create new variable scopes. If J introduced new variable scopes for control words, that would prevent updates inside those blocks from being visible outside those blocks.
J's control words (like '<tt>while.</tt>') do not create new variable scopes. If J introduced new variable scopes for control words, that would prevent updates inside those blocks from being visible outside those blocks. Where this form of isolation is desirable, we can use nested functions (J's verbs, adverbs or conjunctions).


=={{header|Java}}==
=={{header|Java}}==