LitDev Extension API

Geography LD3DView LDArray LDBits LDBlueTooth
LDCall LDChart LDClient LDClipboard LDColours
LDCommPort LDController LDControls LDCursors LDDataBase
LDDateTime LDDebug LDDialogs LDDictionary LDEffect
LDEmail LDEncryption LDEvents LDFastArray LDFastShapes
LDFigures LDFile LDFocus LDftp LDGeography
LDGraph LDGraphicsWindow LDHashTable LDHID LDIcon
LDImage LDInline LDIOWarrior LDList LDLogic
LDMath LDMathX LDMatrix LDMusic LDNetwork
LDPhysics LDProcess LDQueue LDRegex LDResources
LDScrollBars LDSearch LDServer LDSettings LDShapes
LDShell LDSort LDSound LDSpeech LDStatistics
LDStopwatch LDText LDTextWindow LDTimer LDTranslate
LDUnits LDUtilities LDVector LDWaveForm LDWebCam
LDWindows LDxml LDZip

LDHashTable
The hashtable provides a fast and efficient way of storing key-value pairs.
Dictionaries have a O(1) scaling and as data size increases the efficiency.
Code by Abhishek Sathiabalan.


Add Clear ContainsKey
ContainsValue GetValue Remove
ToArray

Add(dictionary,key,value)
Adds a key-value pair to a specified dictionary
dictionary The name of the dictionary
key The key to add
value The value to add
returns The number of items in the dictionary or -1 on failure.

Clear(dictionary)
Removes all key-value pairs from a dictionary
dictionary The name of the dictionary
returns The number of items in the dictionary or -1 on failure.

ContainsKey(dictionary,key)
Tells you if the specified dictionary
contains a given key.

dictionary The name of the dictionary
key They key to lookup
returns "True" or "False"

ContainsValue(dictionary,value)
Tells you if the specified dictionary
contains a given key.

dictionary The name of the dictionary
value They value to lookup
returns "True" or "False"

GetValue(dictionary,key)
Retrieves a value given a specified key from the
specified dictionary

dictionary The name of the dictionary
key The key to lookup
returns The value in the key-value pair or "" on failure.

Remove(dictionary,key)
Removes a key-value pair from a specified dictionary
dictionary The name of the dictionary
key They key to remove
returns The number of items in the dictionary or -1 on failure.

ToArray(dictionary)
Converts a specified dictionary into an smallbasic array
dictionary The name of a dictionary
returns "" on failure or an array