Re: [Harbour] Bug: :__enumKey context is lost for codeblocks

2008-11-10 Thread Szakáts Viktor
Other method is declaring temporary local variables for enumerators and forbid using normal MEMVAR/STAATIC/LOCAL variables so the code will look like: proc p( aCountry ) for each aI in aCountry // aI is temporary local variable // allocated automatically by c

Re: [Harbour] Bug: :__enumKey context is lost for codeblocks

2008-11-10 Thread Przemyslaw Czerpak
On Mon, 10 Nov 2008, Mindaugas Kavaliauskas wrote: Hi Mindaugas, > I'm just trying to made my understand about an answer to two questions: > 1) is it good that enumerators are detached to references to iterated items > (or is it better to remain it enumerators in the codeblocks)? If we left the

Re: [Harbour] Bug: :__enumKey context is lost for codeblocks

2008-11-10 Thread Mindaugas Kavaliauskas
Hi, PROC main() LOCAL aCountry, aI aCountry := {"LTU"=>"Lithuania", "ZWE"=>"Zimbabwe"} FOR EACH aI in aCountry QOUT(aI:__enumKey) // OK EVAL({|| QOUT(aI:__enumKey)}) // RTE NEXT RETURN It's expected and correct behavior. Variables stored in codeblocks are det

Re: [Harbour] Bug: :__enumKey context is lost for codeblocks

2008-11-10 Thread Przemyslaw Czerpak
On Mon, 10 Nov 2008, Mindaugas Kavaliauskas wrote: Hi Mindaugas, > PROC main() > LOCAL aCountry, aI >aCountry := {"LTU"=>"Lithuania", "ZWE"=>"Zimbabwe"} >FOR EACH aI in aCountry > QOUT(aI:__enumKey) // OK > EVAL({|| QOUT(aI:__enumKey)}) // RTE >NEXT > RETURN

[Harbour] Bug: :__enumKey context is lost for codeblocks

2008-11-10 Thread Mindaugas Kavaliauskas
Hi, PROC main() LOCAL aCountry, aI aCountry := {"LTU"=>"Lithuania", "ZWE"=>"Zimbabwe"} FOR EACH aI in aCountry QOUT(aI:__enumKey) // OK EVAL({|| QOUT(aI:__enumKey)}) // RTE NEXT RETURN Best regards, Mindaugas ___ Harbo