Difference between revisions of "IndexesOf"

Line 8: Line 8:
 
Returns a list of handles to the indexes of array a. It is different from IndexNames(A), which returns the identifiers of the index variables as text values, instead of handles.   
 
Returns a list of handles to the indexes of array a. It is different from IndexNames(A), which returns the identifiers of the index variables as text values, instead of handles.   
  
It is possible for an array to have more than one local indexes with identical identifers. It is usually best to avoid this, but if you cannot, you can use IndexNames(a) safely because its handles will unambiguously refer to the correct indexes, where IndexNames(a) would return identical text values.
+
Sometimes an array has more than one local index with the same identifier. In this case, you can use IndexesOf(a) to identify each index safely because each handle unambiguously refers to the coresponding index, where IndexNames(a) would return the identifiers as identical and therefore ambiguous text values.
  
  
 
=== Example ===
 
=== Example ===
  
  IndexNames(Car_prices) --> [Car_types,Year]
+
  IndexNames(Car_prices) --> [Car_types, Year]
  
 
Syntax: IndexesOf(a: Array)
 
Syntax: IndexesOf(a: Array)

Revision as of 06:19, 17 December 2013


IndexesOf(a)

Returns a list of handles to the indexes of array a. It is different from IndexNames(A), which returns the identifiers of the index variables as text values, instead of handles.

Sometimes an array has more than one local index with the same identifier. In this case, you can use IndexesOf(a) to identify each index safely because each handle unambiguously refers to the coresponding index, where IndexNames(a) would return the identifiers as identical and therefore ambiguous text values.


Example

IndexNames(Car_prices) --> [Car_types, Year]

Syntax: IndexesOf(a: Array)


Retrieved from "http://lumina.com/wiki/index.php/VarTerm_Functions"

See Also

Comments


You are not allowed to post comments.