hb_HValues()

HB_HVALUES()

Returns an array of the values of a hash table

Syntax

      HB_HVALUES( <hsTable> ) -> <aValues>

Arguments

<hsTable> a hash table, created by HB_HASH()

Returns

An array of all the hash values

Compliance

Harbour

hb_HValueAt()

HB_HVALUEAT()

Gets/sets a hash value at a given position

Syntax

      HB_HVALUEAT( <hsTable>, <nPosition>, [<NewValue>] ) -> <Value>

Arguments

<hsTable> a hash table, created by HB_HASH()

<nPosition> the position of an entry within the hash table that will be returned

<NewValue> a new value to be assigned to the hash table at the given position

Returns

The existing value, or the new value if it is given

Compliance

Harbour

hb_HSet()

HB_HSET()

Sets a hash value

Syntax

      HB_HSET( <hsTable>, <Key>, <Value> ) -> <hsTable>

Arguments

<hsTable> a hash table, created by HB_HASH()

<Key> the key of the entry to be set; can be of type: number, date, datetime, string, pointer

<Value> the entry value

Returns

The hash table

Compliance

Harbour

hb_HScan()

HB_HSCAN()

Scans a hash table

Syntax

      HB_HSCAN( <hsTable>, <Value>, [<nStart>], [<nCount>, [<lExact>] )
                -> nPosition

Arguments

<hsTable> a hash table, created by HB_HASH()

<Value> to be located within the hash table

<nStart> starting index, defaults to 1 if omitted

<nCount> counter, defaults to (length) – <nStart> is omitted

<lExact> logical valuye indicating whether the comparision is to be be exact or not

Returns

The position of the located value within the hash table, or zero (0) if not found.

Compliance

Harbour

hb_HPos()

HB_HPOS()

Locates the index of a key within a hash table

Syntax

      HB_HPOS( <hsTable>, <Key> ) -> nPosition

Arguments

<hsTable> a hash table, created by HB_HASH()

<Key> key for which its position is to be determined; can be of type: number, date, datetime, string, pointer

Returns

A integer number being the index position of the key within the hash table.

Compliance

Harbour

hb_HPairAt()

HB_HPAIRAT()

Returns a two-dimensional array of a hash table entry key/value pair

Syntax

      HB_HPAIRAT( <hsTable>, <nPosition> ) -> <aKeyValue>

Arguments

<hsTable> a hash table, created by HB_HASH()

<nPosition> the position of an entry within the hash table that will be returned

Returns

A two-dimensional array of the key/value pair entry of the hash table

Compliance

Harbour