Hello,

How to use variables with the ascan type hash ()?

[CODE]
function Main

local n, cVar := "Two", hHash := hb_Hash()

hb_HSetCaseMatch( hHash, .F. )

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

n := ascan( hHash, { |aField| aField[2] == cVar } )

? n

return NIL

[ENDCODE]

...i generated the following error:

[ERROR]

Error BASE/1068  Argument error: array access
Called from (b)MAIN(13)
Called from ASCAN(0)
Called from MAIN(13) 

[ENDERROR]

Best Regards,

Rossine.

-- 
View this message in context: 
http://www.nabble.com/Ascan-for-Hash-tp23355934p23355934.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