Anonymous user
Dynamic variable names: Difference between revisions
→{{header|Smalltalk}}
Line 1,178:
the above creates a variable which is visible only inside the evaluated block (which is considered good style). It will not be visible outside.
A bad style alternative which creates a globally visible variable in the Smalltalk namespace (and
<lang smalltalk>| varName |
varName := Stdin request: 'Enter a global variable name:'.
|