I'm not seeing the problem here
I just ran:
response$ = "6|^16|^17|^18|^19|^20|^21"
do
qty = Val( getstringtoken( response$, "|^", 1 ) )
Print( str(qty) ) // prints 15
if qty > 0 then print("It really is an integer")
// qty = 15
FOR T=2 TO qty STEP 2
PrintC( GetStringToken( response$, "|^", T ) )
PrintC( "=" )
Print( GetStringToken( response$, "|^", T + 1 ) )
NEXT T
sync()
loop
And got:
6
It really is an integer
16=17
18=19
20=21
It appears as if the string is being parsed properly.
What is in your response$ ?
What is your output?
You do realize that you need to put a sync call in to write to the screen?
Also, I'd highly advise against using 2 characters as separators. I've often used chr(31) so that it won't be mistaken for anything else.