k
→
x ©Save k to y
...
EndFunc
The comments show what happens with the call myfunc(y).
[7.14] Determine calculator model and ROM version in programs
It can be useful for your program to determine the model and ROM version of the calculator on which it
is running. For example, since the 92+ LCD screen is 240 x 128 pixels, and the 89 screen is only 160 x
100 pixels, programs that take advantage of the larger 92+ screen won't work well on the 89: all the
output won't be shown. The 92+ has many functions not included in the 92, so if your program uses
those functions, it won't run on the 92.
If you want your programs to determine if they are running on an 89 or a 92+, Frank Westlake provides
this code to identify the calculator model:
©
Identify Model
Local j,tmp,timodel
list
▶
mat(getConfg(),2)
→
tmp
For j,
1
,rowDim(tmp)
If tmp[j,
1
]="Screen Width" Then
If tmp[j,2]=240 Then:"TI-92"
→
timodel
ElseIf tmp[j,2]=
1
60 Then:"TI-89"
→
timodel
Else:""
→
timodel
EndIf
EndIf
EndFor
When this code finishes, the variable 'timodel' is "TI-92", "TI-89", or "" if the calculator seems to be
neither model. Frank notes that this is slow, but reliable.
Lars Fredericksen offers this code which also determines if the calculator is a TI92 or TI92II:
©
Identify model
Local j, tmp, timodel
""
→
timodel
getconf()
→
tmp
If getType(tmp)="EXPR" Then
"TI-92"
→
timodel
Else
For j,
1
,dim(tmp),2
If tmp[j]="Screen Width" Then
If tmp[j+
1
]=240 Then
"TI-92p"
→
timodel
ElseIf tmp[j+
1
]=
1
60 Then
"TI-89"
→
timodel
EndIf
Exit
EndIf
EndFor
endif
After execution, the local variable timodel holds the strings "TI-92" for a TI-92, "TI-92p" for a TI92 Plus,
or "TI-89" for a TI-89.
7 - 14
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...