zone97

Associated Arrays?

2 posts in this topic

#1 ·  Posted (edited)

I don't know if this is the proper term for this, but what I am looking for is best practice for Creating an array that shows in a dropdown list as one thing, but has a completely different value for processing? Does that make sense?

; Here is the array
Global $rArray[5]=["A", "B", "C", "D", "E"] ; Drop down items.
Global $vArray[5]=["1", "2", "3", "4", "5"] ; Values

For $i = 0 To UBound($rArray) - 1
   $drop &= "|" & $rArray[$i] ; What is displayed in dropdown.
   $rate &= "|" & $vArray[$i] ; What you get when you select an item.
Next

Is this the best way to deal with this? Or should i use a 2d array?

 

Thanks,

Edited by zone97
notations

 

Spoiler

WinSizer 2.1 (01/04/2017) - Download - [ Windows Layout Manager ]
Folder+Program (12/23/2016) - Download - [ USB Shortcut Creator ]

 

Share this post


Link to post
Share on other sites



Use the Map datatype (offered in the beta version) or use ScriptingDictionary object. Using the search feature will give you plenty of examples.


This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.
Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe here
RegExp tutorial: enough to get started
PCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta.

SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.
SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.
An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.
SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)
A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!
SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now