输出到lisp

时间:2016-10-23 02:00:02

标签: file io lisp

我是LISP的新手,我在编写文本文件时遇到了麻烦。我已经阅读了食谱和其他教程,以及这里的以下示例,但我不断收到同样的错误:

"Incorrect keyword arguments in (:DIRECTION
                                :OUTPUT
                                :IF-EXSISTS
                                :SUPERCEDE
                                :IF-DOES-NOT-EXSIST
                                :CREATE) .
   [Condition of type CCL::SIMPLE-PROGRAM-ERROR]"

我的代码如下:

(defun writeTest()
       (with-open-file (str "numbers.txt"
       :direction :output 
       :if-exsists :supercede 
       :if-does-not-exsist :create)

       (format str "printing to a file")))

非常感谢任何帮助!

1 个答案:

答案 0 :(得分:2)

拼写错误:"exsists" - > "exists"