say you have tags in a string eg
[chat]blabla[/chat][p]23.2435[/p]
this program will get you the info in between the specified tag
sync on:sync rate 0
string$ = "[a]this is a[/a][b]this is b[/b][poo]this is poo[/poo]"
do
text 10,10,getstrvar("poo",string$)
sync
loop
function getstrvar(tag$,string$)
temp$ = ""
res$ =""
final$ = ""
length = len(string$)
for t = 1 to length
if mid$(string$,t) = "["
for y = t+1 to length
if mid$(string$,y) = "]"
temp$ = ""
for r = t+1 to y-1
temp$ = temp$ + mid$(string$,r)
next r
if temp$ = tag$
for u = y+1 to length
if mid$(string$,u) = "["
final$ = ""
for i = y+1 to u-1
final$ = final$ + mid$(string$,i)
t = length
next i
exit
endif
next u
endif
exit
endif
next y
endif
next t
endfunction final$
What is happening to them[the children] is the only thing they've known. The whole system of values is turned upside down: a child is appreciated and loved if it earns money by stealing