Re: [八六] 借我放
lsp
(defun finddat (fn di / fp dat d char)
(setq fp (open fn "r"))
(if (null fp)
(progn
(princ "\nFile not found")
)
)
(while (and (setq dat (read-line fp))
(setq char (substr dat 1 1))
(if (= char ";") t
(progn
(setq dat (read dat) d (car dat))
(/= d di)
)
)
)
)
(close fp)
(if (= d di)
dat
(progn
(princ "\nData list for ")(princ di)
(princ "not found in ")(princ fn)
nil
)
)
)lsp
(defun finddat (fn di / fp dat d char)
(setq fp (open fn "r"))
(if (null fp)
(progn
(princ "\nFile not found")
)
)
(while (and (setq dat (read-line fp))
(setq char (substr dat 1 1))
(if (= char ";") t
(progn
(setq dat (read dat) d (car dat))
(/= d di)
)
)
)
)
(close fp)
(if (= d di)
dat
(progn
(princ "\nData list for ")(princ di)
(princ "not found in ")(princ fn)
nil
)
)
)
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 140.112.46.19
討論串 (同標題文章)
完整討論串 (本文為第 3 之 8 篇):
八六