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
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
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
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
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