cons append用法差异示例
;;功能:获得特定符号表的列表。;;参数:name为符号名。有效符号表名称为Layer,Ltype,Viewx,Style,Block,Appid,Ucs,Dimstyle和Vport。
(defun get-tblnext1 (table-name / D LST)
(while (setq d (tblnext table-name (null d)))
(setq lst (cons (cdr (assoc 2 d)) lst))
)
(reverse lst)
)
;;示例(get-tblnext2 "layer")
(defun get-tblnext2 (table-name / D LST)
(while (setq d (tblnext table-name (null d)))
(setq lst (append lst (list (cdr (assoc 2 d)))))
)
) 請問,有沒評論?
页:
[1]