This program deletes variables which are locked, archived or both. The order of the unarchiv and
unlock commands is important, because a variable must be unarchived before it is unlocked, or a
"Memory" error occurs. This program works because no errors occur if you unlock or unarchive a
variable which is already unlocked or unarchived. This means that the program can also be used as a
quick way to delete a list of variables which are not locked or archived.
The unarchiv and unlock commands are used in Try ... EndTry blocks, otherwise an error occurs if you
try to delete system variables. Many system variables can be deleted, and it is often useful to do so.
This program should obviously be used with some care, since there are no prompts to verify that you
really want to delete the variables.
[7.40] Recall expression without variable value substitution
You can use the RCL operation ([2nd] [STO] on the TI-89 and TI-92+) to recall an expression without
substituting variable values. For example, suppose you store an equation to eqn1:
a+b=c
→
eqn
1
then if you evaluate eqn1 at the entry line, the result a+b=c is returned as expected. However, if you
store numeric values to 1, 2, and 3 to a, b and c, respectively, then evaluating eqn1 returns true, since
1+2 = 3. You can recall the original expression and avoid the variable value substitution with [RCL].
This operation can be accomplished in a TI Basic program, but the RCL operation is not
programmable. Instead, we need to use a different method, as this code example shows.
rclexpr(ë)
Prgm
local ö,ü
Try:newFold(ä):else:endTry
© Create new folder if necessary
setFold(ä)
→
ö
© Make new folder current and save old folder
#ë
→
ü
© Evaluate expression
setFold(#ö)
© Restore old folder
util\copyto_h("ü")
© Return expression as a string
EndPrgm
The expression is evaluated in a folder in which the variables do not exist, so substitution cannot take
place. The expression is returned as a string, otherwise the variable values would be substituted. The
argument ë is a string which specifies the variable and its folder. The folder must be specified, since
the expression is evaluated in a different folder. As an example, suppose that the variable eqn1 and
the variables a, b and c are all in the main\ folder. If rclexpr() is in the util\ folder, then the call to get the
expression in eqn1 is
util\rclexpr("main\eqn
1
")
and the history display looks like this after execution:
7 - 40
Summary of Contents for TI-92+
Page 52: ...Component side of PCB GraphLink I O connector detail 1 41...
Page 53: ...LCD connector detail PCB switch side 1 42...
Page 54: ...Key pad sheet contact side Key pad sheet key side 1 43...
Page 55: ...Key cap detail 1 44...
Page 57: ...Component side of PCB with shield removed A detail view of the intergrated circuits 1 46...
Page 410: ...void extensionroutine2 void Credit to Bhuvanesh Bhatt 10 4...