Rossine wrote:
> 
> How to use variables with the ascan type hash ()?
> 

Something like

[CODE]
FUNCTION main()
local n, cVar := "Two", hHash := hb_Hash(), aArray 

hHash := { 1, "One" } 
hHash := { 2, "Two" } 
hHash := { 3, "Tree" } 

?hb_isHash( hHash )

hHash := { 1 => "One", 2 => "Two" } 
hb_hSet( hHash, 3, "Tree" )

?hb_isHash( hHash )

//hb_HCaseMatch( hHash, .F. ) 

n := hb_hScan( hHash, { |key,value| value == cVar } ) 
? n 

aArray := hb_hValues( hHash )
n := aScan( aArray, { |value| value == cVar } ) 
? n 

return NIL
[END CODE]

Regards,
Petr
-- 
View this message in context: 
http://www.nabble.com/Ascan-for-Hash-tp23355934p23356371.html
Sent from the Harbour - Dev mailing list archive at Nabble.com.

_______________________________________________
Harbour mailing list
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour

Reply via email to