TIB: Extracting data from a string
[Prev][Next][Index][Thread]
TIB: Extracting data from a string
I'm writing an address book program, and have come to the conclusion that
the only way to manage a large amount of data would be from a big string and
a big list. I've made a little program that can extract text from a list,
that goes a bit like this [BTW: the stuff enclosed in quotes are comments,
they screw up the Ans var but who cares. {this is for the 86}]
"<Sample Info...>"
"Hellothisisalargelist" -> BIGSTRING
{5,4,2,1,5,4} -> BIGLIST
</Sample Info...>"
While dimL BIGLIST > 1
BIGLIST(dimL BIGLIST) -> ENDSTR
sum BIGLIST+1 -> BEGINSTR
sum BIGLIST-1 -> dimL BIGLIST
sub(BIGSTRING,BEGINSTR,ENDSTR) -> SHOWstr
"<Show the string>"
Disp SHOWstr
"</Show the string>"
End
"<Get the very first word>"
sub(BIGSTRING,1,BIGLIST(1))-> SHOWstr
Disp SHOWstr
Return
Okay, this was difficult (for me) but here's the part that stumps me is how
to extract like, 1 address book entry from a string and a list. What I've
got above extracts data from an entire string, but not just a bit of it. :-(
--
o w e n c a n n o n
owencannon@mac.com
http://homepage.mac.com/owencannon
Follow-Ups: