本帖最后由 chlh_jd 于 2012-8-24 03:47 编辑
今天才看到,虽然已有CAOYIN大师的最佳解,兴趣来了满写个通用的;
- ;;
- ;;(setq strlst '("a" "b" "c" "d" "e"))
- ;;(f strlst " ") 返回其他语言可读列表
- (defun lst->string (l del)(if (cadr l) (strcat (car l) del (lst->string (cdr l) del)) (car l)))
- ;;
- ;;(reallst->string '(0 0 0) ",")
- ;;(sendkeys (reallst->string pt ",")) 向命令行发送点坐标
- (defun reallst->string (l del)(if (cadr l) (strcat (rtos(car l)) del (reallst->string (cdr l) del)) (rtos(car l))))
- ;;
- ;;(intlst->string '(08 11 12 25 27) "-") 打印彩票组合
- (defun intlst->string (l del)(if (cadr l) (strcat (itoa(car l)) del (intlst->string (cdr l) del)) (itoa(car l))))
|