to better explain the behavior as expected, one might try:
code:
$var=1,0
$loopcount
test()

function test()
$test=0
$loopcount=$loopcount+1
? $loopcount

$var[test()]
endfunction

it does the same thing, but this is more easily understood as will not work.

well, adding there a switch that stops looping after 1000 loops, makes it work, but anyway.
_________________________
!

download KiXnet