Hello Petr,
Petr Chornyj wrote:
>
>
> 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(
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" }
h
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
[EN