Hash_New

<< Click to Display Table of Contents >>

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

Hash_New

 

Description

 

Create new Hash Table container and return its handle

 

Syntax

 

pHash = Hash_New(InitialCapacity [, Type])

 

Returns

 

Number: a pointer to a Hash Table

 

Parameters

 

Name

Type

Optional

Meaning

InitialCapacity

Number

No

Number of expected Key/data pairs

If a value < 100 will be specified, a minimum of 100 will be used.

Type

Number

Yes

Hash Table type. Possible types:

1.%Hash_String2String

2....future use

3....future use

 

Default type is String to String %Hash_String2String: Key and Data pairs will be of string type.

 

Remarks

 

For maximum performances it is better to pre-allocate more capacity then the exact expected key/data pairs

 

Restrictions

 

See also

 

Hash_Free

 

Examples