Dictionary Object

Results 1 to 2 of 2

Thread: Dictionary Object

  1. #1
    Kitten Guest

    Default Dictionary Object

    What exactly is a Dictionary object? I&#039m reading a beginners book that talks about it but does not properly explain. Thanks for your help in advance,<BR>Kitten.

  2. #2
    Papa Zito Guest

    Default RE: Dictionary Object

    A dictionary is basically a list. Imagine it like a table with two columns. The first column is the key, and the second is the value for that key. Say you were going to make a list of states and their capitals. You could have :<BR><BR>Dim Capitals<BR>Set capitals=Server.CreateObject("Scripting.Dictionary ")<BR>Capitals.Add "Texas", "Austin"<BR>...etc...<BR><BR>Then you can look something up in it like this :<BR><BR>&#060;P&#062;The capital of Texas is &#060;%=Capitals.Item("Texas")%&#062;&#060;/p&#062;<BR><BR>You can also use loops to go through them. I personally have never used a dictionary object, because it&#039s basically just an array, but I can see it&#039s uses also.<BR><BR>Clear as mud? :)<BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts