With this code I could show allways the lp variable changes from
1 to 5 with loop.
And it is stucks at 6, without looping
I didn't say to add one more. The range is from 1 to 5 not 6
sync on
do
print lp
lp=loopfunc()
sync
loop
function loopfunc()
local lp
for lp=1 to 5
next
endfunction lp
Let's change this one with this code
With this code "aa" variables is returned from loopfunc() function and its stored in the "lp" variable and takes the value of "aa"
in this case programm starts from 0 to 5 not 6 but jumps to 5
at once and does not changes from 1 to 5 with loop.
sync on
do
cls
text 0,0,str$(lp)
lp=loopfunc()
sync
loop
function loopfunc()
local lp
lp=0
for lp=1 to 5
inc aa,1
next
endfunction aa
If it was correct I would see
1
2
3
4
5
1
2
3
4
5
.
.
.
Is this a bug?