Array and/or Dictionary Objects

Sometimes I really need to maintain a fast colleciton of variables for lookup purposes - often with a key of sorts. So...

  1. Can you guys add a "Dictionary" object like the good 'ole days or VB or a Hash Table like action? Something that we can use a key to lookupo and retreive from instead of iterating?
  2. Could you add some sort multi value version of the above? An array would do (if its quick to perform as an action), but given the inherent overhead in the actions as a whole, perhaps some sort of multi-value quick storage that can be looked up using a key?

Maybe you can build this using standard XML in memory and abstract the multiple steps/node iteration into a small set of new actions? Having only stacks and queues is just too limiting for many of the things U want to do and hammering a SQL box for simplistic things like this is just silly...

Thanks, TJ.

What exactly would you be storing in the dictionary, what types? I think we could certainly do something, I just need to see a more detailed use case so that we don’t waste time with the wrong end of the stick. How do you envisage adding to the dictionary (a Set Key/Value Pair action?).


All types of course (why not ask for the world, eh?)! I think you could easily use an XML DOM for the plumbing, so just treat everything like a string/variant. You could also use a disconnected ADO recordset if you wanted (although you use XML for most other things, so why rock the boat?).

As for functionality, I think the all of the Stack/Queue actions still hold true, but I would say the following should exist for a Dictionary action as a minimum - but truly I think you could use ALL the exisiting actions you have for a Statck/Queue - simply extend them to allow for a indexed key pair for speed:

  • Define Dictionary
  • Get Dictionary Item Count
  • Add Item to Dictionary (key/value pair)
  • Remove Item from Dictionary (using key)
  • Clear Dictionary
  • Dictionary Contains (single item check using key)
  • Get Dictionary Item (using key OR value)
  • Dictionary Iterator

Now all this is well and good, but what I would REALLY want is the functionaly of a dictionary/hashtable that allows for multiple values per key - but I'll settle for a Dictionary object