Houtan Bastani houtanb@gmail.com writes:
On 18 Apr 2012, at 17:27, Sébastien Villemot wrote:
In this context it is debatable. In some languages like C, co would be restored to "abc" after the loop; but not in R for example.
The question is whether a "for" loop pushes a new environment on the environment stack containing only one variable (the indexing variable).
I think that it is simpler if we consider that a for loop does not create a new environment, and therefore that in your example co is equal to "FR" after the loop.
To make our language simple, I think only function calls should push new environments on the environment stack (like R does).
So, then, no new scope within a model block and hence no model variables with the same names as programming variables.
It is possible to have the same symbol referring to both a programming variable and to a model variable, as in the first example that you sent on the list.