startmacro

call skipSingle
call skipMultiple

endmacro

!******************************************************************************!
procedure skipSingle

result answer 9
result numIterations 0
do count 1 10
  if count EQ 10 continue
  calc numIterations numIterations 1 +
enddo

assert/text="^reg.main.name: skip single loop" numIterations EQ answer

return
!******************************************************************************!
procedure skipMultiple

result L:numOuters 0
result L:numInners 0
do outer 1 3
  do inner 1 2
    if inner EQ 2 continue 2
    calc L:numInners numInners 1 +
  enddo
  calc L:numOuters numOuters 1 +
enddo
assert/text="^reg.main.name: skip multiple loops" numOuters EQ 0 AND &
                                                  numInners EQ 3

return
