Dictionary Objects?

Results 1 to 2 of 2

Thread: Dictionary Objects?

  1. #1
    Lee Tracey Guest

    Default Dictionary Objects?

    In plain english what are dictionary objects?<BR><BR>Thanks in advance<BR>Lee

  2. #2
    Join Date
    Dec 1969

    Default RE: Dictionary Objects?

    One word in English "Awesome!" They are Hashes (aka associate arrays) used to store values in a semi-logical way for the developer. I&#039ve done my share of Perl development and hashes are great!<BR><BR>Basically there is a KEY (a logical identifier) and a VALUE (where the value can be just about any data type).<BR><BR>For example, you have the months of the year and wanted to keep a bunch of counts (say actual, planned):<BR><BR>JAN = 1,22<BR>FEB = 123,322<BR>...<BR>DEC = 224,224<BR><BR>You can use a Dictionary Object like this<BR><BR>Dim dict<BR>Set dict = CreateObject("Scripting.Dictionary")<BR>dict("JAN" ) = Array(1,22)<BR>dict("FEB") = Array(123,322)<BR>...<BR>dict("DEC") = Array(224,224)<BR><BR>MsgBox "The actual and planned values for February are " & dict("FEB")(1) & " AND " & ("FEB")(2)<BR><BR><BR>I apologize for any typos ... in a hurry.<BR><BR>HTH<BR><BR>Steve

Posting Permissions

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