|
计算器程序
程序名称: |
Search'enALL 2 |
平台: |
TI-Nspire |
系统/软件要求: |
os 2.1 |
版本号: |
2 |
类型: |
其他 |
作者: |
Cyvre |
大小(K): |
1 |
更新日期: |
2010-10-24 |
描述: |
- |
已知缺陷: |
未知 |
源代码: |
开源/部分开源 |
在缩减体积的同时增强了功能支持各种苛刻的代数式(比如带sin(等函数的,变量是weei_12_fs970_dsfhskjhlsk之类的)
程序就不发了,直接上源码,大家随便使用
- Define checkchar(str)=
- Prgm
- If getType(str)≠"STR"
- string(str)→str
- characters:={_,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,0,1,2,3,4,5,6,7,8,9}
- times:=1
- For times,1,37,1
- inString(str,string(character[times]))→checkresult
- If checkresult≠0
- Exit
- EndFor
- If checkresult≠0 Then
- If 1≤times≤27 Then
- checkresult:=1
- ElseIf 28≤times≤37 Then
- checkresult:=2
- EndIf
- EndIf
- Delvar characters,times
- EndPrgm
- -----------------------------------------------------------------------------------------------
- -----------------------------------------------------------------------------------------------
- Define getvar(str)=
- Prgm
- If getType(str)≠"STR"
- string(str)→str
- dim(str)→size
- times0:=0
- checkresult:=0
- Lbl start
- While checkresult≠1 and times0-1≤size
- times0:=times0+1
- checkchar(right(left(str,times0),1))
- EndWhile
- times1:=times0
- While checkresult≠0 and times0-1≤size
- checkchar(right(left(str,times0),1))
- times0:=times0+1
- EndWhile
- If right(left(str,times0-1),1)="(" Then
- times0-1→times0
- Goto start
- EndIf
- right(left(str,times0-2),times0-times1-1)→variable
- Disp variable
- Delvar size,times0,times1,checkresult,variable
- EndPrgm
复制代码 |
|