今天我第一次尝试编写循环语句,出现了这样的一个问题 (defun c:test () (setq pa (getpoint "n\ 输入楼梯的基点:")) (setq hh (getint "n\ 输入楼梯的每节高度:")) (setq ww (getint "n\ 输入楼梯每节宽度:")) (setq n (getint "n\ 输入阶梯数:")) (setq pb (polar pa (/ pi 2) hh)) (setq pc (polar pb 0 ww)) (command "line" pa pb pc "") (setq pp pc) (repeat (- n 1) (setq p1 (polar pp (/ pi 2) hh)) (setq p2 (polar p1 0 ww)) (command "line" pp p1 p2 "") (setq pp p2) ) (princ) ) 这个程序测试没问题 但是我改了其中的三个句子后不能运行改程序 (setq pa (getreal "n\ 输入楼梯的基点:")) (setq hh (getreal "n\ 输入楼梯的每节高度:")) (setq ww (getreal "n\ 输入楼梯每节宽度:")) 请教高手这是为什么?
|