Comparison of programming languages (associative array): Difference between revisions

Content deleted Content added
Line 288:
[[Visual FoxPro]] implements mapping with the Collection Class.
 
<source lang="visualfoxpro">
<pre>
mapping = NEWOBJECT("Collection")
mapping.Add("Daffodils", "flower2") && Add(object, key) – key must be character
Line 294:
object = mapping("flower2") && returns "Daffodils" (retrieve by key)
object = mapping(1) && returns "Daffodils" (retrieve by index)
</presource>
 
GetKey returns 0 if the key is not found.