at:tutorial:appendix
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
at:tutorial:appendix [2008/07/10 16:08] – * tvcutsem | at:tutorial:appendix [2008/07/10 16:17] – added tvcutsem | ||
---|---|---|---|
Line 439: | Line 439: | ||
</ | </ | ||
- | This listener is invoked whenever the future is resolved with a new value. Its code can thus be executed multiple times. | + | The above listener is invoked whenever the future is resolved with a new value. Its code can thus be executed multiple times. |
< | < | ||
Line 447: | Line 447: | ||
</ | </ | ||
- | This listener invoked if all results have been gathered (only possible if the maximum number of results is known). If there are no exceptions, only the first code block is triggered. If there are only exceptions, the first block is still invoked with an empty value table. | + | The above listener |
Note the following properties of multifutures: | Note the following properties of multifutures: | ||
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