Hash_CapGet

<< Click to Display Table of Contents >>

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

Hash_CapGet

 

Description

 

Get current Hash Table container capacity.

 

Syntax

 

n = Hash_CapGet(pHash)

 

Returns

 

Number, current maximum Hash Table container capacity.

 

Parameters

 

Name

Type

Optional

Meaning

pHash

Number

No

Handle of a Hash Table returned by Hash_New

 

Remarks

 

Hash Table capacity is the number of pre-allocated bucket. Its number is than used for hash value algorithm calculation.

It is a good choice to allocate a capacity double the number of expected key/data pairs in order to have as less as possible hash value conflicts.

 

Restrictions

 

See also

 

Examples