Function check(check$) If check$="quit" quit = 1 EndIf End Function
************
Then after each check() call put:
if quit=1 then goto quitlabel
**********************
Not elegant, by any means, but it works :)
The problem with "undefined label" is that .quitlabel is a local label and you were trying to reference it from within a function. Being local, the function couldn't see it and complained.