Re: (TI-83) How do I store a formula as text?


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

Re: (TI-83) How do I store a formula as text?



In <E12L27.89x@news2.new-york.net>, "Harry Elam" <hbe@way.com> writes:


>>>>  "Bill Brower" <wbrower@indiana.edu> writes:
>>>> I have a TI-83 and want to store some basic formulas for reference.
>>>> For example, I'd like to store "D=(I-A)X" somewhere.
>>>> I tried the List function, but continually get syntax errors for the =
>>>> symbol.


>>>  In <E0yMMy.4K1@news2.new-york.net>, "Harry Elam" <hbe@way.com> writes:
>>>  Have you looked at chapter 15 of the Guidebook? You can store an
>>>  expression in a string variable, say Str0, and execute it with
>>>  expr(Str0). Of course, you have to go to the Catalog to find expr(...


>>  holmgren@chelsea.ios.com@chelsea.ios.com (Robert Holmgren) writes:
>>  expr(Str0) is fine for converting a string into an expression, but
>>  I too can't figure out how to do the opposite -- get expression
>>  A into string Str0.  The calculator barfs on A->Str0.  Equ>String(
>>  works only with equations.  There's gotta be a way... but what is
>>  it?


>What kind of expression is A? "A" is a valid expression which returns the
>value of variable A. To enter it into Str0, you type:
>  "A"->Str0
>To get the value, you type:
>  expr(Str0)
>Actually, you could just type A, which is a good deal quicker.
>
>Where is the problem? "Equation" in TI calc terms doesn't necessarily
>mean an expression with an equals sign in it.


Suppose A is a real number, the result of a calculation.  Suppose it's the
number of months you've been alive, thus your age B*12=A.  Thus, A is not a
string.  Writing "A"=Str0 per your example simply puts the string literal
"A" (Ascii-65) into Str0 -- whereas what I want (let's suppose) is to
concatenate a string that says:
  "You've been alive for "+A+" months"=Str0
How to?  What am I missing?


Every other Basic I've ever used provides two complementary functions,
e.g.:
  STR$(val)   -- return the $tring equivalent of the number represented
                 by val
  VAL($tring) -- return the numeric VALue of an Ascii string
But in TI-Basic, I only see the second function, "expr(Str#)".  Where's the
first function?  Or, if it's absent directly, how do you kludge it?


References: