[TIB] Re: Character Substitution?


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

[TIB] Re: Character Substitution?




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 :)

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
> >
> >
> >




Follow-Ups: References: