只需一步,快速开始
似乎lisp无法进行逻辑或判断。我编一个程序碰到要进行三次条件判断,如果是c语言可以用&进行。
lisp 怎么办啊?可以这样吗?(cond (> x 2)&(> l 3) (setq choose 1))
使用道具 举报
(cond ((and (> x 2) (> l 3)) (setq choose 1)) ((and (> x 4) (> l 9)) (setq choose 2)) ..... (T (dosomething)) )
不要随便自己乱造一些函数
lisp没有&这个用法的
本版积分规则 发表回复 回帖后跳转到最后一页
小黑屋|手机版|CAD论坛|CAD教程|CAD下载|联系我们|关于明经|明经通道 ( 粤ICP备05003914号 ) ©2000-2023 明经通道 版权所有 本站代码,在未取得本站及作者授权的情况下,不得用于商业用途
GMT+8, 2024-5-4 14:02 , Processed in 0.268630 second(s), 25 queries , Gzip On.
Powered by Discuz! X3.4
Copyright © 2001-2021, Tencent Cloud.