Equation library with multiple menus
If your often use many equations, it is awkward to choose the correct equation from the single pop-up
menu used in eqlib(). One solution is to use multiple equation library matrices to organize groups of
equations. eqlibx(), shown below, implements this idea.
eqlibx()
Prgm
©Eqn library, multiple menus
©14nov01/[email protected]
©main\eqlxmenu{} holds menu names
©main\eqdef{m}[n,2] holds labels & equations; {m} = 1,2,3,...
local k,n
0
→
k
© Display 'menu of menus'
popup main\eqlxmenu,k
if k=0:return
© Quit if [ESC] pressed
"main\eqdef"&string(exact(k))
→
n
© Build name of library matrix
0
→
k
© Display equation menu
popup mat
▶
list(subMat(#n,1,1,rowDim(#n),1)),k
if k=0:return
© Quit if [ESC] pressed
#n[k,2]
→
eqn
© Set chosen equation
setMode("Split 1 App","Numeric Solver")
© Start numeric solver
EndPrgm
This program displays two pop-up menus. The first menu shows the names of the different libraries.
The second menu shows the equations in the chosen library. The library names are stored in the list
variable main\eqlxmenu. For example, you might have three groups of equations for geometry,
electricity, and physics, and you could use this for main\eqlxmenu:
{"geometry","electricity","physics"}
There is a corresponding equation matrix for each element of eqlxmenu, and the matrices have
specific names. The library for the first element is main\eqdef1, for the second element is main\eqdef2,
and so on. For our example, the equation matrices are
geometry:
main\eqdef1
electricity:
main\eqdef2
physics:
main\eqdef3
The format of these equation matrices is the same as that of eqlib() above: the first column c1 is the
equation label, and the second column c2 is the equation. These examples show typical equation
matrices.
Matrix main\eqdef1 for geometry equations
tan(Œ/k)*k*r^2=area
"polygon area"
3
.5*a*b*sin(cc)=area
"triangle area"
2
c^2=a^2-2*a*b*cos(cc)+b^2
"cosines law"
1
c2
c1
9 - 28
Содержание TI-92+
Страница 52: ...Component side of PCB GraphLink I O connector detail 1 41...
Страница 53: ...LCD connector detail PCB switch side 1 42...
Страница 54: ...Key pad sheet contact side Key pad sheet key side 1 43...
Страница 55: ...Key cap detail 1 44...
Страница 57: ...Component side of PCB with shield removed A detail view of the intergrated circuits 1 46...
Страница 59: ...Keypad rubber sheet key cap side Inside front cover showing keycaps in place Detail of a key cap 1 48...
Страница 410: ...void extensionroutine2 void Credit to Bhuvanesh Bhatt 10 4...