401423620ea730bd3c732782bb80335d992c82a2
* src/vm/hashes.c
* src/vm/hashfunc.c
+ implemented posibility to use hashes a sorted arays with binary search.
Implemented HB_BOOL hb_hashScanSoft( pHash, pKey, &nPos ). Function
if similar to, but returns nPos even if pKey is not found in pHash.
Extended HB_HHASKEY( aHash, xKey [, @nPos ] ) --> lFound
Function optionaly returns position of the item with a largest key
smaller or equal to xKey. If xKey is less than all keys in hash,
zero position is returned. I.e.,
aHash := {10=>, 20=>}
? HB_HHASKEY( aHash, 5, @nPos ), nPos // .F. 0
? HB_HHASKEY( aHash, 10, @nPos ), nPos // .T. 1
? HB_HHASKEY( aHash, 15, @nPos ), nPos // .F. 1
? HB_HHASKEY( aHash, 20, @nPos ), nPos // .T. 2
? HB_HHASKEY( aHash, 25, @nPos ), nPos // .F. 2
Description
Harbour Core — Reference source for Five development
Languages
C
80.3%
xBase
17.8%
Makefile
0.6%
C++
0.4%
Harbour
0.4%
Other
0.3%