Difference between revisions of "IndexValue"
Line 2: | Line 2: | ||
[[Category:Doc Status C]] <!-- For Lumina use, do not change --> | [[Category:Doc Status C]] <!-- For Lumina use, do not change --> | ||
[[category:Evaluation Functions]] | [[category:Evaluation Functions]] | ||
− | |||
== IndexValue(I) == | == IndexValue(I) == | ||
− | Returns the index value for the given variable or index «I». Some variables have both an index value and a result value. Examples include -- a [[Self-Indexed Arrays|self-indexed array]]; a variable or index defined as a list of identifiers or list of expressions; and a Choice list with a self-domain. [[IndexValue]](I) returns the index value of «I», where <code>(I)</code> alone would return its result value. | + | Returns the index value for the given variable or index «I». Some variables have both an index value and a result value. Examples include -- a [[Self-Indexed Arrays|self-indexed array]]; a variable or index defined as a list of identifiers or list of expressions; and a [[Choice]] list with a self-domain. [[IndexValue]](I) returns the index value of «I», where <code>(I)</code> alone would return its result value. |
== Library == | == Library == | ||
Line 19: | Line 18: | ||
:<code>Variable Flat_A := MdArrayToTable(A, rows, IndexValue(L))</code> | :<code>Variable Flat_A := MdArrayToTable(A, rows, IndexValue(L))</code> | ||
− | Download | + | Download [http://wiki.analytica.com/index.php?title=File%3AIndexValueFunctionEg.ANA example model file]. |
− | [ | ||
==History== | ==History== | ||
− | [[IndexValue]] | + | [[IndexValue]] was introduced in Analytica 4.0 and requires build 4.0.0.33 or later. |
== See Also == | == See Also == | ||
Line 29: | Line 27: | ||
* [[Sample]] | * [[Sample]] | ||
* [[Function Parameter Qualifiers#IndexType|IndexType]] parameter qualifier | * [[Function Parameter Qualifiers#IndexType|IndexType]] parameter qualifier | ||
+ | * [[Domain Indexes]] | ||
+ | * [[CopyIndex]] | ||
+ | * [[AddIndex]] | ||
+ | * [[Self-Indexed Arrays]] |
Revision as of 01:48, 4 February 2016
IndexValue(I)
Returns the index value for the given variable or index «I». Some variables have both an index value and a result value. Examples include -- a self-indexed array; a variable or index defined as a list of identifiers or list of expressions; and a Choice list with a self-domain. IndexValue(I) returns the index value of «I», where (I)
alone would return its result value.
Library
Array Functions
Details
The IndexValue function, if it weren't built-in, could easily be defined as:
Function IndexValue(I: IndexType) := I
Examples
Index L := [I, J, K, "value"]
Index rows := 1..Size(A)
Variable Flat_A := MdArrayToTable(A, rows, IndexValue(L))
Download example model file.
History
IndexValue was introduced in Analytica 4.0 and requires build 4.0.0.33 or later.
See Also
- Mid
- Sample
- IndexType parameter qualifier
- Domain Indexes
- CopyIndex
- AddIndex
- Self-Indexed Arrays
Comments
Enable comment auto-refresher