Re: Ti-92 Programming How-to?


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

Re: Ti-92 Programming How-to?



>
> Fellow TI-92 Programmers:
>
> I'd like to write a function that references a stored variable (no
> problem so far) and then updates that variable for the next time I
> call that function (big problem).  By the way, this is being attempted
> on a TI-92 with the Plus Module.  If anyone can enlighten me on how
> to do this I'd truly appreciate it.
>
> Thanks,
>
> Kurt Krueger

That sort of thing is called a "side-effect", and is strictly prohibited in a
TI-92 function (as distinguished from a _program_), which is just good clean
programming sense. Either you will have to use a program, not a function, or
you will have to re-think what it is you want to do and why.

One very powerful, but often overlooked programming command in the "TI-92 and
friends" set of calculators is _expr_, which will let you *execute* any valid
instruction you build as a string.  You can use _string_ to capture current
values, twiddle with them, even build new variable names according to specs,
etc. and _expr_ will make them all "come alive".  Again, though, you cannot do
this from within a function, which is supposed to have a single dedicated
purpose.

RWW Taylor
National Technical Institute for the Deaf
Rochester Institute of Technology
Rochester NY 14623

>>>> The plural of mongoose begins with p. <<<<