只需一步,快速开始
如何判断两个列表相同??
(command "dtext" ..... )(setq a (entget(entlast)))(if (= (assoc 0 a) (cons 0 "text")) (command "line" .....))
结果出错, 为什么?
使用道具 举报
Andyhon发表于2008-1-10 21:08:00(equal (assoc 0 a) (cons 0 \"TEXT\"))
还是不行啊.
不管条件是否equal,返回结果都为nil.
??
注意"TEXT"的大小写!
(= (assoc 0 a) (cons 0 "text"))为什么不改成(= (cadr (assoc 0 a)) "text")?
能用字符比较的何必要用表比较呢?
(wcmatch (cdr (assoc 0 (entget (car (entsel))))) (strcase "*text"))
这样子就无所谓大小写了。。。
本版积分规则 发表回复 回帖后跳转到最后一页
小黑屋|手机版|CAD论坛|CAD教程|CAD下载|联系我们|关于明经|明经通道 ( 粤ICP备05003914号 ) ©2000-2023 明经通道 版权所有 本站代码,在未取得本站及作者授权的情况下,不得用于商业用途
GMT+8, 2024-5-10 09:26 , Processed in 0.153345 second(s), 25 queries , Gzip On.
Powered by Discuz! X3.4
Copyright © 2001-2021, Tencent Cloud.