Difference between revisions of "IndexesOf"

(changed category name (meta-inference functions))
(rewrite using handle instead of varterm)
Line 3: Line 3:
 
[[Category:Meta-Inference Functions]]
 
[[Category:Meta-Inference Functions]]
  
Returns the indexes of array A as a list of VarTerms.
 
  
= Declaration =
+
= IndexesOf(a) =
  
IndexesOf( A : Array )
+
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. 
  
= Description =
+
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.
  
IndexesOf(A) returns a list of varTerms, each one serving as a handle to the indexes of array A.
 
  
This is similar to IndexNames(A), except that IndexesOf returns actual varTerms, while IndexNames returns the index identifiers (as text strings).
+
== Examples ==
 +
 
 +
IndexNames(Car_prices) --> [Car_types,Year]
 +
 
 +
Syntax: IndexesOf(a: Array)
  
It is possible for an array to have more than one local index having identical names. Obviously, this is not recommended, but in the unusual case where this occurs, the index handles returned by IndexesOf are unambiguous.
 
  
 
Retrieved from "http://lumina.com/wiki/index.php/VarTerm_Functions"
 
Retrieved from "http://lumina.com/wiki/index.php/VarTerm_Functions"
  
= Examples =
 
 
IndexNames(Car_prices) --> [Car_types,Year]
 
  
= See Also =  
+
== See Also ==  
  
* [[VarTerm Functions]]
+
* [[Handle Functions]]
 
* [[IndexNames]]
 
* [[IndexNames]]

Revision as of 07:09, 19 April 2007


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.

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.


Examples

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.