April 26, 2024, 12:23:01 PM

News:

IonicWind Snippit Manager 2.xx Released!  Install it on a memory stick and take it with you!  With or without IWBasic!


Associative Arrays

Started by Doc, December 04, 2006, 05:42:54 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Doc

December 04, 2006, 05:42:54 PM Last Edit: December 04, 2006, 05:44:28 PM by David Coker
With all of the text processing I've been doing over the last few months, the associative arrays are a welcome addition! ...I'm always looking for new ways to accomplish things. Thanks! :)

It seems that the AA's are limited to one key matching a single value and was wondering if they might ever be beefed up to hold more than one value per key?

...or maybe I'm describing a table structure? Something like:

TableAdd(mytable,"key","value1","value2","value3")
TableGetKey(mytable, key[0]) 'Returns value1
TableGetKey(mytable, key[1]) 'Returns value2
TableGetKey(mytable, key[2]) 'Returns value3

I ran across something like that with another language that I've played around with in the past and thought it might be something to consider or at least inquire about.

-Doc-

Ionic Wind Support Team

dictionary_test2 shows a method to associate a structure with a key.  In a future revision I may change the dictionary to use an anytype value instead of a string value, which will still be compatible of course.

Aurora has associative array classes for string, pointers and integers BTW ;)
Ionic Wind Support Team

Doc

Okay thanks... I'll have a closer look at the dictionary_test2 example.

...and I for sure haven't yet given up on learning to use Aurora. Not by a long shot!  ;)

-Doc-