Dictionary? (Real Studio network user group Mailinglist archive)

Back to the thread list
Previous thread: Serial Port programming: Reading data from a digital thermometer
Next thread: Re: Microphone [Easter fun]


ASCII value differences in strings Mac to Windows and SQL   -   McGrath, John
  Dictionary?   -   AlterImage aol.com
   Re: Dictionary?   -   Mike Benonis

Dictionary?
Date: 31.03.02 10:35 (Sun, 31 Mar 2002 09:35:25 EST)
From: AlterImage aol.com
I've seen a number of posts recently regarding dictionaries. I'm using RB 3.5
and can't find anything about it. Is this a new feature in v4?

If so, can someone give a quick explanation of what it is and what it can do?
From the posts I've read, it seems very similar to a collection. How is it
different and what's the advantage?

Thanks.

Ken Fleisher
<email address removed>

---
Subscribe to the digest:
<mailto:<email address removed>>
Unsubscribe:
<mailto:<email address removed>>

Re: Dictionary?
Date: 31.03.02 15:50 (Sun, 31 Mar 2002 09:50:23 -0500)
From: Mike Benonis
Yes, it's new in RB4. From the language reference:

> The Dictionary class provides the functionality of the Collection class and
> offers several advantages: With the Collection class, the time taken to
> locate and item is a function of the number of items in the Collection because
> the search is sequential. A Dictionary uses a hash table, making the time
> (relatively) independent of the number of items. It is designed for high
> speed lookups. Also, the Key parameter in a Dictionary is a variant, but is a
> String in the Collection class, giving you greater flexibility. On the other
> hand, a Collection can store multiple values per key. When you assign a value
> to a key that is already in the Dictionary, the new value replaces the old
> one.

HTH,
-Mike

on 3/31/02 9:35 AM, <email address removed> at <email address removed> wrote:

> I've seen a number of posts recently regarding dictionaries. I'm using RB 3.5
> and can't find anything about it. Is this a new feature in v4?
>
> If so, can someone give a quick explanation of what it is and what it can do?
> From the posts I've read, it seems very similar to a collection. How is it
> different and what's the advantage?

---
Subscribe to the digest:
<mailto:<email address removed>>
Unsubscribe:
<mailto:<email address removed>>