3017| 3
|
将文本内容写入到txt文件中,用你的慧眼发现错误吧! |
1明经币
最佳答案函数STRE没有设定返回值。
(defun stre(str e / nn)
(setq nn(strlen str))
(if (> e nn)
(progn
(repeat (- e nn)
(setq str(strcat str "@")
)
)
)
(princ "\012您给定的字符串长度太短!")
)
(prin1)
str ;;;>>>>>>>>>>>>>>>>>>>>>>>> ADD THIS
)
另外,可以精简函数
(Defun stre (str e) (while (< (strlen str) e)(setq str (strcat str "@"))) str)
| ||
,
| ||
| |