只需一步,快速开始
我是一个Visual lisp初学者,我想用edit_box输入3个数值,通过计算公式计算结果,显示在第4个edit_box里。
代码如下:
(defun JS (/ a1 b1 d1 r1) ;计算子程序 (setq a1 (get_tile "A")) (setq b1 (get_tile "B")) (setq d1 (get_tile "D")) (setq r1 (+ b1 a1 d1) ) (set_tile "R" r1))
但是运行完就直接跳出了,请问用什么方法解决?(我直接把a1赋给r1就能显示,计算后就不显示,直接跳出对话框了。)
使用道具 举报
(get_tile key)
Return ValuesA string containing the tile’s value.
(setq r1 (+ b1 a1 d1) )==> string + string + string
so should convert to real first .....
qizhixuan发表于2008-5-11 13:30:00我是一个Visual lisp初学者,我想用edit_box输入3个数值,通过计算公式计算结果,显示在第4个edit_box里。代码如下:(defun JS (/ a1 b1 d1 r1) ;计算子程序 (setq a1 (get_t
(defun JS (/ a1 b1 d1 r1) ;计算子程序 (setq a1 (atof (get_tile "A"))) (setq b1 (atof (get_tile "B"))) (setq d1 (atof (get_tile "D"))) (setq r1 (+ b1 a1 d1) ) (set_tile "R" (rtos r1)))
本版积分规则 发表回复 回帖后跳转到最后一页
小黑屋|手机版|CAD论坛|CAD教程|CAD下载|联系我们|关于明经|明经通道 ( 粤ICP备05003914号 ) ©2000-2023 明经通道 版权所有 本站代码,在未取得本站及作者授权的情况下,不得用于商业用途
GMT+8, 2024-5-10 08:05 , Processed in 0.131633 second(s), 25 queries , Gzip On.
Powered by Discuz! X3.4
Copyright © 2001-2021, Tencent Cloud.