几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量

几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量 (http://www.dimcax.com/hust/index.php)
-   ObjectARX(AutoLISP) (http://www.dimcax.com/hust/forumdisplay.php?f=178)
-   -   判断字符串中字母 (http://www.dimcax.com/hust/showthread.php?t=11677)

yang686526 2009-04-26 05:45 PM

判断字符串中字母
 
判断字符串中字母
www.dimcax.com
判断字符串中字母
(defun judge (string / i table len stratom str-ascii)
(setq i 0
table '()
len (strlen string)
)
(while (< i len)
(setq str-ascii (vl-string-elt string i))
(if (or
(and (>= str-ascii 6) (<= str-ascii 90))
(and (>= str-ascii 97) (<= str-ascii 122))
)
(progn
(setq ascii-str (chr str-ascii))
(setq table (cons ascii-str table))
)
)
(setq i (1+ i))
)
(setq table (reverse table))
table
)
判读输入的字符串中的字母,并将这些字母依次添加到表table中,返回该表
progress every day!!!


所有的时间均为北京时间。 现在的时间是 10:32 AM.