Adesu
2006-09-21, 06:23 AM
Hi Alls,
I have a simple code to check if a variable same as a target,then alert message would display,I just repeat test it,but always fail,any am I wrong?
(defun c:test (/ sdia hei)
(setq sdia 25)
(setq hei 21)
(while
(if
(= hei (* sdia 0.8))
(alert "\nTarget has finish")
) ; if
(setq hei (- hei 0.1))
) ; while
) ; defun
I have a simple code to check if a variable same as a target,then alert message would display,I just repeat test it,but always fail,any am I wrong?
(defun c:test (/ sdia hei)
(setq sdia 25)
(setq hei 21)
(while
(if
(= hei (* sdia 0.8))
(alert "\nTarget has finish")
) ; if
(setq hei (- hei 0.1))
) ; while
) ; defun