EasyManua.ls Logo

Texas Instruments TI-89 - Page 37

Texas Instruments TI-89
507 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
EndIf
return {xd,yd,dr,dd}
EndFunc
©=================
© Begin mainline
©=================
StoGDB gdb © Save graph database settings
GetMode("ALL")modedb © Save mode settings
setMode("3","1") © Set Angle mode to radians
ClrDraw © Clear all plots, functions and drawings
ClrGraph
PlotsOff
FnOff
SetGraph("3","1") © Turn grid off
SetGraph("4","1") © Turn axes off
DispG © Display graph screen
© Initialize calculator-specific parameters
if getconfg()[dim(getconfg())-14]=240 then © Determine calculator model by screen width
239main\±x © For TI-92+: set maximum x-dimension
103main\±y © set maximum y-dimension
111ko © set [O] key code
109km © set [M] key code
104kh © set [H] key code
8273khm © set [HOME] key code
.013772main\±scl © set scale factor in inches/pixel
else
159main\±x © For TI-89: set maximum x-dimension
77main\±y © set maximum y-dimension
45ko © set [O] key code
53km © set [M] key code
56kh © set [H] key code
277khm © set [HOME] key code
.01381main\±scl © set scale factor in inches/pixel
endif
© Initialize cursor positions
10main\±ox © Set origin cursor 'x' 10 pixels from screen left
main\±y-10main\±oy © Set origin cursor 'y' 10 pixels above screen bottom
intdiv(main\±x,2)main\±tx © Set target cursor to center of screen
intdiv(main\±y,2)main\±ty
1mode © Set mode to move target cursor
draw_all() © Redraw cursors
help() © Display 'help'
© Main loop
Loop
GetKey()key © Get pressed key code
If key=264 or key=khm or key=4360:Exit © Exit program
© Handle cursor movement keys
If key=340 Then © [RIGHT]
move_x(mode,1) © Move cursor 1 pixel right
draw_all() © Update screen
ElseIf key=337 Then © [LEFT]
move_x(mode,1) © Move cursor 1 pixel left
draw_all() © Update screen
ElseIf key=338 Then © [UP]
1 - 26

Table of Contents

Other manuals for Texas Instruments TI-89

Related product manuals