Utility routines for writing to and reading from Text variables
Author: Bhuvanesh Bhatt (firstname.lastname@example.org)
Last updated: September 23, 2001
This is a set of two very simple little programs that write to and read from a text variable.
If you wish to prevent evaluation or auto-simplification of the expression, input it as a string. To insert a newline, just input a blank string.
The writing mode can be:
"w" or "write" if you want to create a new text variable or overwrite an existing one
"a" or "append" if you want to append to an existing text variable
str_format should be:
0 (default) if strings should be written without quotation marks
1 if quotation marks should be added.
Do not try to read anything other than a Text variable. The maximum number of characters per line for TxtRead is 512.
TxtWrite("Here is an expression","test","write")
TxtWrite("Let's try a string with quotes","test","append",1)
Now the text variable "test" in the current folder will contain:
:Here is an expression
:"Let's try a string with quotes"
· For the variable name, you can specify a variable in the current folder or you can give the full path. For TxtWrite, if the folder you specify does not exist, you will be prompted to create it.
· Any input errors (bad argument type, etc.) are shown in the status line.
TxtRead() function added to read from a text variable. It returns the entire content of the text variable as a list of strings.
Although I have tried several inputs with this program before releasing it, I cannot guarantee that it will not hang or crash. If it does hang or crash, reset the calc:
[2nd][LOCK][ON] on the TI-92 Plus
[2nd][LEFT][RIGHT][ON] on the TI-89
If this doesn't reset the calculator, take out a battery, then press and hold [(-)][)] while you insert the battery. I am not responsible for any damage to your calculator.