/************************************************************************ * brknxt -code for next and break * ************************************************************************/ subroutine brknxt(sp,lextyp,labval,token) include ratfor.def integer i,labval(MAXSTACK),lextyp(MAXSTACK),sp,token,temp for(i = sp;i >= 1;i = i-1) if(lextyp(i) == LEXWHILE | lextyp(i) == LEXDO | lextyp(i) == LEXREPEAT | lextyp(i) == LEXSWITCH | lextyp(i) == LEXFOR) { if(token == LEXBREAK) temp=labval(i) + 1 else { if(lextyp(i) == LEXSWITCH) next #can't next switches temp=labval(i) } call outgo(temp) return } if(token == LEXBREAK)call synerr(S_ILL_BREAK) if(token == LEXNEXT)call synerr(S_ILL_NEXT) return end