TIB: Re: Storing text on the 86
[Prev][Next][Index][Thread]
TIB: Re: Storing text on the 86
You can only turn strings (text) into a list by replacing each character in
the string with a number and then placing that number in a list.
example
:"text" -> STR1
:"ABCDEFGHIJKLMNOPQRSTUVWXYZ" -> STR2
:for(k,1,lngth STR1,1
:1 -> x
:While sub(STR1,k,1) != sub(STR2,x,1) --!= is not equal--
:1+x -> x
:End
:x -> LIST(k
:End
This would leave LIST with a value of {20,5,24,20} which is the numerical
equivalent of TEXT (1=A,2=B,3=C,...).
-----Original Message-----
From: Douglas S. Oliver <dsoliver@earthlink.net>
To: ti-basic@lists.ticalc.org <ti-basic@lists.ticalc.org>
Date: Thursday, February 26, 1998 3:09 PM
Subject: TIB: Storing text on the 86
>
> Hi, I've been reading with interest the discussions about
>creating phone books, etc. for the TI calcs and have been trying
>to figure out how and where text strings would be saved on the
>86. I have been unable to save text to a list. I have tried
>saving my name for example to a variable (that works) and then
>saving the variable to a list (enhh (buzzer sound), try again).
>I've tried to write a word directly into a list, no go. If text
>doesn't go into a list, then where?
> I don't need a whole program, per se, just a simple segment
>to play around with. Then again, maybe that simple segment must
>be a short program. I've tried to find answers in the manual but
>got nowhere. Am I just making a simple mistake or simply making
>wrong assumptions about what can and cannot be done? Is there a
>faq page that will explain my specific questions? (Your
>answering "yes" to this last question ain't gonna work. I need
>to know specifically where it is and what to search for. Every
>time I look for faq pages, I get a lot of irrelevant info, mostly
>because I am defining my search wrong, I suspect.) Thanks for
>your help--D
>
>Douglas S. Oliver
>Department of Anthropology
>University of California
>Riverside, CA 92521
>e-mail: douglaso@citrus.ucr.edu
> or: dsoliver@earthlink.net
Follow-Ups: