Home » 2020 » July » 8 » While wend loop
2:10 PM
While wend loop

'..in PASS 1---------------------------------
 if typList[tc] = tkWHILE 
     stack[stacktop++]=tc
 else if typList[tc]=tkWEND
    --stacktop
   jumptargets[tc]=stack[stacktop]
   jumptargets[stack[stacktop]]=tc
end if

'..in the run
 if typList[tc] = tkWHILE 
    if resWhile = vNO 
    tc=jumptargets[tc]+1
 end if
or better ---------------------------------
'..in PASS 1
 if typList[tc] = tkWHILE 
     stack[stacktop++]=tc
 else if typList[tc]=tkWEND
    --stacktop
   jumptargets[tc]=stack[stacktop]
   jumptargets[stacktop]=tc
end if

'..in the run
 if typList[tc] = tkWHILE 
    if resWhile = vNO 
        tc=jumptargets[tc]+1
    end if
 end if

Views: 9 | Added by: Zlatko | Rating: 0.0/0
Total comments: 0
Name *:
Email *:
Code *: