Fixed LEAVE N not working

  • This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.
#1
I have several examples. Here's the simplest one. I would not expect to see the "left inner do" message at all. And I would expect that, in the end, i and j are both 1. But ...
Code:
v:\> type leaven2.btm
do i=1 to 2
    do j=1 to 2
        leave 2
    enddo
    echo left inner do
enddo
echo i = %i and j = %j

v:\> leaven2.btm
left inner do
left inner do
i = 3 and j = 1
 
#4
I think it's working correctly. My first test failed miserably, apparently because LEAVE's argument can't be in a variable. Could you expand LEAVE's argument?

I had to replace
Code:
leave %zz
with
Code:
iff %zz == 1 then
   leave 1
elseiff %zz == 2 then
   leave 2
elseiff %zz == 3 then
   leave 3
endiff
I also noticed that LEAVE (ITERATE also) is not echoed when echo is on ... WAD?