open函数的路径问题
(defun daochu()(setq file2 (open "c:/1.TXT" "w"))
(write-line (itoa yzh1) file2)
(write-line (itoa yzh2) file2)
(write-line (itoa yzh3) file2)
(write-line (itoa yzh4) file2)
(close file2)
)
加入上面的代码保存为daochu.lsp,但此lsp放在哪里并不知道
我要让程序里的 c:/1.TXT,这个路径文件变成daochu.lsp的当前目录怎么设置? ……
(if (setq path (findfile "daochu.lsp")) (progn
(setq fname (strcat(substr path 1 (- (strlen path) 10)) "1.txt"))
……
))
…… 用第一行不就可以了么,第二行是干什么的?
页:
[1]