Hash_GetPtr

<< Click to Display Table of Contents >>

Navigation:  ThinBASIC Core Language > Data Structures > Hash Table >

Hash_GetPtr

 

Description

 

Retrieve a pointer to data associated to sKey in an Hash Table container

 

Syntax

 

pData = Hash_GetPtr(pHash, sKey)

 

Returns

 

A pointer to data associated with sKey

 

Parameters

 

Name

Type

Optional

Meaning

pHash

Number

No

Handle of a Hash Table returned by Hash_New

sKey

String

No

Unique key

 

Remarks

 

Sometimes, especially when storing UDT (User Defined Types), it is more convenient and  much more efficient to return a pointer to a data structure instead of returning the string representing the UDT

 

Restrictions

 

sKey is case sensitive.

sKey cannot contains nulls

 

See also

 

Examples