Difference between revisions of "IndexesOf"

Line 7: Line 7:
 
Returns a list of [[handle]]s to the indexes of array «a». It is different from [[IndexNames]](a), which returns the identifiers of the indexes as text values instead of handles.   
 
Returns a list of [[handle]]s to the indexes of array «a». It is different from [[IndexNames]](a), which returns the identifiers of the indexes as text values instead of handles.   
  
Sometimes an array has more than one [[Local Indexes|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 corresponding index, where [[IndexNames]](a) would return the identifiers as identical and therefore ambiguous text values.
+
If «X» has an [[implicit index]] (an index without a name), the first element of the output list is [[null]], rather than a handle.
 +
 
 +
If the array has more than one [[Local Indexes|local index]] with the same identifier, you can use [[IndexesOf]](a) to identify each index safely because each handle unambiguously refers to the corresponding index, where [[IndexNames]](a) would return the identifiers as identical and therefore ambiguous text values.
  
 
[[Syntax]]:  
 
[[Syntax]]:  

Revision as of 20:48, 4 August 2016


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 indexes as text values instead of handles.

If «X» has an implicit index (an index without a name), the first element of the output list is null, rather than a handle.

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

Syntax:

IndexesOf(a: Array)

Example

IndexNames(Car_prices) → [Car_types, Year]

See Also

Comments


You are not allowed to post comments.