Hash Table

<< Click to Display Table of Contents >>

Navigation:  ThinBASIC Core Language > Data Structures >

Hash Table

 

Description

 

Hash Table implements a data structure container able to store/retrieve/delete a Key/Value relationship.

 

A Hash Table containers has the following characteristics:

one-to-one Key/Value relationship

Key must be unique

Key is Case Sensitive

nulls are not allowed in a String Key but can be used in String Value

Value stored/retrieved/removed using lookup Key

Hash Table is in unpredictable order

store/restore to/from String or File

 

 

Additional information about Hash Table

 

Use Wikipedia as source of information: https://en.wikipedia.org/wiki/Hash_table

 

 

How to use in thinBasic

 

As a minimum, the following are the step required to use an Hash Table:

1.use Hash_New to create a new hash table

2.use Hash_Set to add/change key/value pairs

3.use Hash_Get to retrieve key/value pairs

4.use Hash_Free to remove the entire hast table and all associated key/value pairs