Re: TIB: Converting characters to a numeric (ASCII) value.


[Prev][Next][Index][Thread]

Re: TIB: Converting characters to a numeric (ASCII) value.




whoops... that is what you said.  sorry.  yeah that is the only way
you can do that kinda stuff.




---The Garth Johnson <gbjohnson@yahoo.com> wrote:
>
> 
> the only thing i can figure you can do is a brute force method.  I
> don't have my 85 right now so i don't know if this is exactly right...
> ok what you have to do is get a string with every single character in
> it.  In the right order.
> "char1 char2 char3 char4 char5 char6 char7 char8 char9.... all the way
> to char255"  There wouldn't be any spaces between the seperate chars.
> 
> then do a for loop
> :for x,1,255
> :if "A"==sub(list,x,1
> :disp A,"=",x
> :end
> 
> what that basically does is it searches each character in the string
> and sees if it is the same character as the one you are testing for. 
> If they are the same, it displays the number x that gives that
> character.
> 
> you have to have the characters in the right order!!!
> 
> does this make any sense?
> 
> does this have anything to do with the dimentionti's challenge?
> 
> 
> 
> 
> 
> 
> ---Greg Miller <greg.miller@usa.net> wrote:
> >
> > 
> > 	Is there any way to convert a character to a numerical value,
> > and then back again.  I'm not talking about converting "13" to 13,
but
> > rather converting the character "A" to 65, then being able to
convert
> > 65 back to "A".
> > 	If the TI doesn't use ASCII, that's fine, I just need to be
> > able to manipulate characters with arithmetic operations, then
convert
> > them back to characters.
> > 	Right now, I have a big long string of all the characters and
> > a subroutine which scans through them all and returns an index into
> > the string.  So anything better than that would be helpful.
> > 
> > 	I'm using a TI-86.
> > 
> > Greg Miller: Senior Consultant (IT Security/Programming)
> > Custom CGI Programming: http://www.iglou.com/mTech/
> > greg.miller@usa.net     http://members.iglou.com/gmiller/
> > 
> 
> ==
> 
> The Garth Johnson
> 
> Visit my website!  http://www.bigfoot.com/~garthjohnson
>                 "Now with jokes for your mental enjoyment!"
> 
> "Popularity, Religion, Science, Jobs, Cars, The Internet,
Civilization-it's all very nice but it's we're just deluding
ourselves...  Inside of every perfect postured, mild mannered person
there is a teenager saying "dude! this is cool!" and sending slinkeys
down upward escalators."
> _________________________________________________________
> DO YOU YAHOO!?
> Get your free @yahoo.com address at http://mail.yahoo.com
> 
> 

==

The Garth Johnson

Visit my website!  http://www.bigfoot.com/~garthjohnson
                "Now with jokes for your mental enjoyment!"

"Popularity, Religion, Science, Jobs, Cars, The Internet, Civilization-it's all very nice but it's we're just deluding ourselves...  Inside of every perfect postured, mild mannered person there is a teenager saying "dude! this is cool!" and sending slinkeys down upward escalators."
_________________________________________________________
DO YOU YAHOO!?
Get your free @yahoo.com address at http://mail.yahoo.com