[TIB] Re: Character Substitution?


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

[TIB] Re: Character Substitution?




On Fri, 4 May 2001, ffolkes wrote:

> 
> I guess I'm confused by this "escape" stuff. Why did you choose esc? 
> Doesn't esc stop the program? Also, I run it normally, right? From the home 
> screen, test() but then where do I enter the string? Do I manually put the 
> string in the code? Thanks :)

The ON button stops programs, the Escape button acts just like any other
key.  As is the program doesn't show what you are inputing if you add
"Disp c" after char(k)->c it will show what you are inputting.  If you
would prefer hitting the Enter key to show you the converted string you
could change the line that has k=264 to say k=13. Escape probably wasn't
the best button for me to choose.

> 
> TM
> 
> > > >Hi,
> > > >
> > > >here's a program for a ti-92 to do that
> > > >Just enter the string and hit esc
> > > >
> > > >
> > > >
> > > >""->fstring
> > > >newMat(26,2)->mat
> > > >"g"->mat[1,1]
> > > >"t"->mat[1,2]   g = t
> > > >"o"->mat[2,1]
> > > >"r"->mat[2,2]   o = r
> > > >...
> > > >Lbl begin
> > > >While k=0
> > > >getKey()->k
> > > >EndWhile
> > > >If k = 264      Esc was hit
> > > >Disp String
> > > >Goto end
> > > >EndIf
> > > >char(k)->c      Turn Value from getkey to a character
> > > >0->k
> > > >0->done
> > > >0->i
> > > >While done=0            Search matrix till it finds the correct character
> > > >If c=mat[i,1] Then
> > > >String&mat[i,2]->String
> > > >1->done
> > > >EndIf
> > > >i+1->i
> > > >EndWhile
> > > >Goto begin
> > > >Lbl end
> > >
> > >
> > >
> 
> 
> 




References: