TIB: Storing an expr w/o evaluating it (for TI-92)


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

TIB: Storing an expr w/o evaluating it (for TI-92)



i.e: The variable x contains the value 2
I request from the user an expr to store in the variable var.
If the user enters x+3, 5 will be stored, instead of x+3. How can I do to store the expr x+3?
Of course I could store it as a string, but my program have to make a difference between expressions and strings. What I could do is requesting a special character in the beginning of the string (i.e: if the string begins with "->", then I know that the user want the rest to be considered as an expr), but the program must be able to use the destination variable in another arithmetics, without converting it.
The only way I found is to creating a temp folder, to store the variable in it, to copy the variable with the copyvar insrtuction and to delete the temp folder. Is there a better way?
 
Thanks and sorry for the bad English
Jeremie Knusel

Follow-Ups: