I chalk it up to be poor coding.
What is happening is that Quit and Exit both take an expression that follows and tries to enumerate it as the exit code. This has happened in previous versions in certain circumstances.
Best practice dictates that one should always pass a value with Quit and Exit.
code:
break on
$a = "1~2"
$i=$a
gosub A
$a=$i
for each $x in $a
? "'$x'"
next
;Not only 'return' works. Try using 'exit 1' and 'quit 1'
exit 1
;quit 1
;return
:A
$i=split($i,"~")
return
{edit - Jooel had posted a couple of comments but obviously had a change of heart and deleted them leaving Chris and Shawn's comments below out of context}
[ 24. May 2003, 15:11: Message edited by: LLigetfa ]
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.