On Mar 25, 2007, at 9:49 AM, Charles Yeomans wrote:

> What is it that you find confusing about the Dictionary interface?

The first awkwardness is the apparent necessity to test for the  
existence of a key before getting the key-value combination
Next, the word "key" is not used when getting a value associated with  
a key.

So

if myDictionary.HasKey("name") then
      myvariable=mydictionary.value("name")
end if

is, I think, the correct code to get the value associated with the  
key "name".

If I were to try say what the second line is doing it is something like:
"get the value associated with the key "name" from myDictionary and  
assign it to "myvariable".

If the second line were:
    myvariable=mydictionary.KEY("name")
it would make more sense to me.

There is also a wonderful function to get each key and value in a  
dictionary. (myVariant=myDictionary.values() and  
myVariant=myDictionary.keys())  I've used it several times and its  
great, but I have to look it each time. its not as simple as

for i=0  ubound(myarray)
next

or

for each element in myarray.
next
  
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to