自己看一下
- (defun c:Test( / fname f i ch chs lines lst)
- (setq fname (getfiled "Select a Lisp File" "" "txt" 8))
- (setq f (open fname "r"))
- (read-line f)
- (while (setq str (read-line f))
- (setq i 1)
- (setq chs "")
- (while (<= i (strlen str))
- (setq ch (substr str i 1))
- (if (/= ch ",")
- (setq chs (strcat chs ch))
- (progn
- (setq lines (append lines (list (read chs))))
- (setq chs "")
- )
- )
- (setq i (1+ i))
- )
- (setq lines (append lines (list (read chs))))
- (setq lst (append lst (list lines)))
- (setq lines nil)
- )
- (princ lst)
- (princ)
- )
|