COLLECTION.EXIST Function
Syntax
Result_Flag as L = Exist(A key)
Arguments
- key
A value of any type (other than pointer) that uniquely identifies an element in a collection.
Description
Returns TRUE if element is in the collection.
Discussion
The <COLLECTION>.EXIST() method returns .T. (TRUE) if the specified Key exists in the specified collection; otherwise, it returns .F. (FALSE). Important : Trailing spaces in Key are considered.
Example
dim mycollection as u mycollection.set("FJ","Fred Jones") mycollection.set("BB","Bryan Boyd") mycollection.set("KL","Kim Lee") mycollection.set("KB","Karen Boyd") mycollection.set("EL","Erica Loyd") ? mycollection.exist("BB") = .T. ? mycollection.exist("bb") = .T. ? mycollection.exist("b") = .F.
See Also