udf(
1
0,20,{
1
,2,3})
will be returned, as long as udf() is not actually defined as a function. You can use the part() function to
extract the various results. With the expression above,
part(udf(
1
0,20,{
1
,2,3}),
1
)
returns 10
part(udf(
1
0,20,{
1
,2,3}),2)
returns 20
part(udf(
1
0,20,{
1
,2,3}),3)
returns {1,2,3}
In general, for part(exp,n), the nth argument is returned.
(Credit to Glenn E. Fisher and Bhuvanesh Bhatt)
[7.18] Simplest (?) application launcher
Here's the problem: as I use my 92+ more and more, I write and download more programs.
Considering that I keep each application in its own folder, and the 8-character name limit prevents
really memorable names, I can't remember where a program was, or what it was called. The problem is
solved with an application launcher, which shows intelligible descriptions of the programs, then
executes the one I choose.
This tip shows two application launchers. I wrote the first one, which sets the application folder. Daniel
Lloyd wrote the second one, which is smaller. Daniel's method does not set the application's folder,
which doesn't matter if the application doesn't need it, or if the application sets the folder itself.
The first application launcher
The code below shows a simple application launcher.
apps()
Prgm
local k,appdesc,appfold
setfold(main)
mat
▶
list(submat(appsdef,
1
,
1
,rowdim(appsdef),
1
)
→
appdesc
popup appdesc,k
appsdef[k,2]
→
appfold
setfold(#appfold)
expr(appfold&"\"&main\appsdef[k,3])
setfold(main)
EndPrgm
apps() displays a pop-up box from which I select the program by its description. apps() then sets the
current folder to the application folder, executes the program, then sets the current folder to \main
when the program is done.
The application information is stored as strings in a 3-column matrix named appsdef. Use the matrix
editor to create and edit this matrix. The three columns are:
column 1: Application description
column 2: Application folder
column 3: Application program name
7 - 18
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...