看板 HSNU_986 關於我們 聯絡資訊
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