Content deleted Content added
→Language support: added FoxPro example |
|||
Line 238:
=== FoxPro ===
Visual FoxPro implements mapping with the Collections Class.
<pre>
mapping = NEWOBJECT("Collection")
mapping.Add("Daffodils", "flower2") && Add(object, key) - key must be character
index = mapping.GetKey("flower2") && returns the index value 1
object = mapping("flower2") && returns "Daffodils"
object = mapping(1) && returns "Daffodils"
</pre>
GetKey returns 0 if the key is not found.
See Collections in FoxPro Help for all the details.
|