|
楼主 |
发表于 2013-1-19 14:07:44
|
显示全部楼层
我找到源代码了,,就是直接用的hashtable,只不过把哈希表包进去了,每次可以少写个HT,但函数名长了不少,且用了stringhash函数,还是用hashtable吧,,,
function YDWESaveIntegerByInteger takes integer pTable,integer pKey,integer i returns nothing
call SaveInteger(YDHT,pTable,pKey,i)
endfunction
function YDWESaveIntegerByString takes string pTable,string pKey,integer i returns nothing
call SaveInteger(YDHT,StringHash(pTable),StringHash(pKey),i)
endfunction
function YDWEGetIntegerByInteger takes integer pTable,integer pKey returns integer
return LoadInteger(YDHT,pTable,pKey)
endfunction
function YDWEGetIntegerByString takes string pTable,string pKey returns integer
return LoadInteger(YDHT,StringHash(pTable),StringHash(pKey))
endfunction |
|