Hi. I've been using KiXtart off and on for a few years for fairly simple scripting, but I finally ran into a problem I can't figure out, so it's time to ask the experts. When I use the exit command from a subroutine called from within a do...until loop, I get an error. Maybe I'm missing something really obvious. Please help!
I've created a test script which yields the same error as my real script.
code:
? "script begins"
do
? "enters do...until loop"
gosub "subscript"
? "returns to do...until loop"
until 1 = 1
? "script finishes"
exit 0
:subscript
? "in subscript"
if 1
? "exiting now..."
exit 1
endif
? "subscript continues"
return
I'm using 3.63, and I get the error,
Script error : expected expression !.
? "returns to do...until loop"
4.20 gives a different error:
ERROR : Error in expression.!
Script: T:\KiX\exittest.KIX
Line : 13
Replacing "exit" with "quit" works, but I'm calling this script from a main script, and need to continue with the main script after exiting.
Any ideas? Thanks in advance!