at:tutorial:appendix
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | Next revisionBoth sides next revision | ||
at:tutorial:appendix [2008/07/10 16:12] – * tvcutsem | at:tutorial:appendix [2008/07/10 16:17] – added tvcutsem | ||
---|---|---|---|
Line 464: | Line 464: | ||
==== Dynamic Variables ==== | ==== Dynamic Variables ==== | ||
+ | |||
+ | The module ''/ | ||
+ | |||
+ | A dynamic variable can be defined as follows: | ||
+ | < | ||
+ | def name := dynamicVariable: | ||
+ | </ | ||
+ | |||
+ | It can be read as follows: | ||
+ | < | ||
+ | ?name or name.value | ||
+ | </ | ||
+ | |||
+ | It can be assigned only within a limited dynamic scope, as follows: | ||
+ | < | ||
+ | with: name is: newval do: { code } | ||
+ | // or | ||
+ | name.is: newval in: { code } | ||
+ | </ | ||
+ | |||
+ | When '' | ||
+ | |||
+ | By convention, we prefix the names of dynamic variables with a '' | ||
+ | |||
+ | You can find more usage examples of dynamic variables in the unit test included in the file '' | ||
==== Ambient References ==== | ==== Ambient References ==== |
at/tutorial/appendix.txt · Last modified: 2021/09/24 10:28 by elisag