Difference between revisions of "Atomic..Do"
Line 16: | Line 16: | ||
== See Also == | == See Also == | ||
+ | * [[Objects_and_Values#Values|Atomic values]] | ||
+ | * [[Function_parameter_qualifiers#Atom|Atomic function parameters]] | ||
* [[Var..Do]] | * [[Var..Do]] | ||
* [[MetaVar..Do]] | * [[MetaVar..Do]] | ||
* [[For..Do]] | * [[For..Do]] | ||
* [[For versus Var]] | * [[For versus Var]] | ||
− |
Revision as of 18:24, 19 August 2016
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:
- MetaVar «x»[ ] := «expr» Do «body»
In most common scenarios, it is also equivalent to these, although there are some subtle distinctions is special cases.
History
This construct was introduced in Analytica 4.2.
See Also
Comments
Enable comment auto-refresher