Difference between revisions of "Atomic..Do"
m (Changed MetaVar to Local) |
|||
(One intermediate revision by one other user not shown) | |||
Line 5: | Line 5: | ||
'''Atomic''' «x» := «expr» '''Do''' «body» is exactly equivalent to: | '''Atomic''' «x» := «expr» '''Do''' «body» is exactly equivalent to: | ||
− | :[[ | + | :[[Local]] «x»[ ] := «expr» Do «body» |
In most common scenarios, it is also equivalent to these, although there are some subtle distinctions as special cases. | In most common scenarios, it is also equivalent to these, although there are some subtle distinctions as special cases. | ||
Line 16: | Line 16: | ||
== See Also == | == See Also == | ||
+ | * [[Atom]] | ||
* [[Objects_and_Values#Values|Atomic values]] | * [[Objects_and_Values#Values|Atomic values]] | ||
* [[Function_parameter_qualifiers#Atom|Atomic function parameters]] | * [[Function_parameter_qualifiers#Atom|Atomic function parameters]] |
Latest revision as of 23:13, 8 October 2021
Atomic x := expr Do body
Declares a local variable, «x», that can be referred to only from within the expression «body», and assigns it the initial value obtained by evaluating «expr». When used from within «body», Analytica guarantees that the value of «x» is atomic -- i.e., non-array-valued. Analytica achieves this guarantee by iterating (horizontally array abstracting) across the result of «expr» when it is array-valued.
Atomic «x» := «expr» Do «body» is exactly equivalent to:
- Local «x»[ ] := «expr» Do «body»
In most common scenarios, it is also equivalent to these, although there are some subtle distinctions as special cases.
History
This construct was introduced in Analytica 4.2.
See Also
Comments
Enable comment auto-refresher