Re: [Harbour] Ascan for Hash

2009-05-03 Thread Rossine
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(

Re: [Harbour] Ascan for Hash

2009-05-03 Thread Petr Chornyj
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

[Harbour] Ascan for Hash

2009-05-03 Thread Rossine
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