I still think there is something broke here, because the bahavior of the exit in the sub-routine changes depending on how its called, if one calls the sub while nested in an IF statement, the EXIT exit's the script ...

code:
if "true"
gosub "myfunc"
endif

But if one calls the sub while nested in a WHILE loop, the sub returns instead of exit's ...

code:
while "true"
gosub "myfunc"
loop

hmmm