自贡黄明儒 发表于 2013-8-19 11:43:48

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)))))
)
)

lsjj 发表于 2013-8-19 15:12:21

請問,有沒評論?
页: [1]
查看完整版本: cons append用法差异示例