store functions or programs in these variables. The variable will appear in Var-Link in the folder in
which it was created. You can create these variables as global variables in programs, but not functions.
You cannot create them in functions.
You can execute a string stored in one of these variables like this:
"test2()"
→
_ttt
1
expr(_ttt
1
)
This sequence will execute the program test2().
(Credit to Frank Westlake)
[7.13] Write to program & function arguments
TI BASIC passes function and program arguments by value, not by reference. For example,
myprog(y)
actually passes the contents of the variable y, not the address of y or a pointer to y. myprog() can write
to y, but if y is a global variable, y is not changed. For example, suppose you have a global variable y
and you call this program, with myprog(y):
myprog(x)
Prgm
7
→
x
EndPrgm
The program runs without error, but the global variable y is not changed to 7, even though x contains 7
within the program.
To bypass this limitation, pass program argument variable names as strings:
myprog("y")
Use indirection within myprog() to access the variable:
myprog(x)
Prgm
local k
...
#x
→
k ©Save y to k
...
k
→
#x ©Save k to y
...
EndPrgm
This method works for programs, not functions, because functions cannot write to global variables. You
can write to the function arguments as local variables, though, and indirection is not needed:
myfunc(x)
Func
...
x
→
k ©Save y to k
...
7 - 13
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...