且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何在Lisp中创建和写入文本文件

更新时间:2023-01-23 10:59:26

(with-open-file (str "/.../filename.txt"
                     :direction :output
                     :if-exists :supersede
                     :if-does-not-exist :create)
  (format str "write anything ~%"))

You may also choose different settings for the with-open-file macro. If you use :append instead of :supersede then you can write into the text file while preserving its context instead of superseding the available content.

相关阅读

技术问答最新文章