cnCalc计算器论坛

 找回密码
 注册
搜索
查看: 3390|回复: 7

[TI-Nspire系列] ns变量提取第二版:Search'enALL 2

[复制链接]
发表于 2010-10-24 20:13:24 | 显示全部楼层 |阅读模式
计算器程序
程序名称: Search'enALL 2
平台: TI-Nspire 
系统/软件要求: os 2.1
版本号: 2
类型: 其他 
作者: Cyvre
大小(K): 1
更新日期: 2010-10-24
描述: -
已知缺陷: 未知
源代码: 开源/部分开源
在缩减体积的同时增强了功能支持各种苛刻的代数式(比如带sin(等函数的,变量是weei_12_fs970_dsfhskjhlsk之类的)
程序就不发了,直接上源码,大家随便使用
  1. Define checkchar(str)=
  2. Prgm
  3. If getType(str)≠"STR"
  4.   string(str)→str
  5. 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}
  6. times:=1
  7. For times,1,37,1
  8.   inString(str,string(character[times]))→checkresult
  9.   If checkresult≠0
  10.     Exit
  11. EndFor
  12. If checkresult≠0 Then
  13.   If 1≤times≤27 Then
  14.     checkresult:=1
  15.   ElseIf 28≤times≤37 Then
  16.     checkresult:=2
  17.   EndIf
  18. EndIf
  19. Delvar characters,times
  20. EndPrgm
  21. -----------------------------------------------------------------------------------------------
  22. -----------------------------------------------------------------------------------------------
  23. Define getvar(str)=
  24. Prgm
  25. If getType(str)≠"STR"
  26.   string(str)→str
  27. dim(str)→size
  28. times0:=0
  29. checkresult:=0
  30. Lbl start
  31. While checkresult≠1 and times0-1≤size
  32.   times0:=times0+1
  33.   checkchar(right(left(str,times0),1))
  34. EndWhile
  35. times1:=times0
  36. While checkresult≠0 and times0-1≤size
  37.   checkchar(right(left(str,times0),1))
  38.   times0:=times0+1
  39. EndWhile
  40. If right(left(str,times0-1),1)="(" Then
  41.   times0-1→times0
  42.   Goto start
  43. EndIf
  44. right(left(str,times0-2),times0-times1-1)→variable
  45. Disp variable
  46. Delvar size,times0,times1,checkresult,variable
  47. EndPrgm
复制代码

Searchemall.txt

1.19 KB, 下载次数: 10, 下载积分: 金钱 -1

 楼主| 发表于 2010-10-24 20:14:40 | 显示全部楼层
最近还打算编一个三国杀 for ns
发表于 2010-11-6 23:04:04 | 显示全部楼层
三国杀我做过
不过中途没耐性失败了
有些地方很烦。。
期待你能做出
发表于 2010-11-7 11:51:11 | 显示全部楼层
你也玩三国杀?
我是彻底的新手
发表于 2010-11-7 12:22:55 | 显示全部楼层
写一个仙剑 for ns吧
我在写仙剑 for 9750
发表于 2010-11-7 17:30:37 | 显示全部楼层
for ns?
实时游戏几乎不可能
 楼主| 发表于 2010-11-7 18:17:11 | 显示全部楼层
写一个仙剑 for ns
我在写仙剑 for 9750
diameter 发表于 2010-11-7 12:22

No way……
发表于 2010-11-7 21:06:06 | 显示全部楼层
…………我就知道……
您需要登录后才可以回帖 登录 | 注册

本版积分规则

Archiver|手机版|cnCalc计算器论坛

GMT+8, 2024-3-29 14:51 , Processed in 0.071591 second(s), 28 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表