need a beginner's introduction to list and map variables/objects

isr

Member
Licensed User
Longtime User
I am a noob with some experience in QuickBasic and PHP/MySQL. I've developed a few simple B4A programs, and now need to work with list and map variables/objects, especially with respect to interactions with databases. However, I can't find in the Beginner's Guide or in the forums a simple introduction or background to what exactly they are. What is their structure or format? I think what is needed is something at the level of chapter 10 in the Beginner's Guide, even if brief,especially if it has some real examples.

Where can I learn more about lists and maps?

Thank you!
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
List is a pretty simple collection. It is like a dynamic array. You can see its methods here: Basic4android - Collections (Core)

Quote from wikipedia: Hash table - Wikipedia, the free encyclopedia
In computer science, a hash table or hash map is a data structure that uses a hash function to map identifying values, known as keys (e.g., a person's name), to their associated values (e.g., their telephone number). Thus, a hash table implements an associative array. The hash function is used to transform the key into the index (the hash) of an array element (the slot or bucket) where the corresponding value is to be sought.

While the implementation of Map is pretty complicated, it is simple to use it. I recommend you to learn more about this data structure. I find it to be the "most powerful" data collection and it can solve many problems.

As this is a general data structure you can find many online tutorials. Search for HashTable / HashMap / Map / Dictionary (all are the same).
 
Upvote 0

isr

Member
Licensed User
Longtime User
Thank you, Erel. I don't know how I missed the descriptions of List and Map in the online documentation, but they are very helpful.

I agree that the hash table concept appears very complex. I will try to understand it better with the resources you mentioned as well as by studying implementations of it in B4A.
 
Upvote 0
Top