早教吧作业答案频道 -->英语-->
autolisp改错(defungeer(x0y0)(setqm(getreal"\npleaseinputm:")z(getint"\npleaseinputz:")b(getreal"\npleaseinputb:")d(getreal"\npleaseinputd:"))(setqd2(*mz))(setqd1(+d2m)d3(-d2m))(setqd22(/d22.0)d11(/d1
题目详情
autolisp改错
(defun geer(x0 y0)
(setq m (getreal "\n please input m:" )
z (getint "\n please input z:" )
b (getreal "\n please input b:" )
d (getreal "\n please input d:" )
)
(setq d2 ( * m z))
(setq d1 ( + d2 m) d3( - d2 m))
(setq d22 (/ d2 2.0) d11 (/ d1 2.0) d33 (/ d3 2.0) d00 (/ d 2.0))
(command "limits" (list 0 0) (list (+ x0 b 50) (+ y0 d11 50))
(command "zoom" "a")
(command "layer" "s" "3" " ")
(command "line"(list (- x0 10) y0) (list (+ x0 b 10) y0))
(command "layer" "s" "0" " ")
(command "line"(list x0 (+ y0 d00 8)) (list x0 (+ y0 d22)) (list (+ x0 b) (+ y0 d22))
(list (+ x0 b) (+ y0 d00 8)) "c")
(command "line"(list x0 (- y0 d00 2)) (list x0 (- y0 d22)) (list (+ x0 b) (- y0 d22))
(list (+ x0 b) (- y0 d00 2)) "c")
(command "layer" "s" "1" " ")
(command "hatch" "u" "45" "4" "n" "w"(list(- x0 2) (- y0 d22 2)) (list(+ x0 b 2) (+ y0 d22 2)) " ")
(command "layer" "s" "0" " ")
(command "line"(list x0 (+ y0 d00 8)) (list x0 (- y0 d00 2)))
(command "line"(list (+ x0 b) (+ y0 d00 8)) (list (+ x0 b) (- y0 d00 2)))
(command "line"(list x0 (+ y0 d00 2)) (list (+ x0 2) (+ y0 d00)) (list (- (+ x0 b) 2) (+ y0 d00))
(list (+ x0 b) (+ y0 d00 2)) )
(command "line"(list x0 (- y0 d00 2)) (list (+ x0 2) (- y0 d00)) (list (- (+ x0 b) 2) (- y0 d00)) (list (+ x0 b) (- y0 d00 2)) )
(command "line"(list (+ x0 2) (- y0 d00)) (list (+ x0 2) (+ y0 d00)) )
(command "line"(list (- (+ x0 b) 2) (- y0 d00)) (list (- (+ x0 b) 2) (+ y0 d00)) )
(command "line"(list x0 (+ y0 d22)) (list (+ x0 m) (+ y0 d11)) (list (- (+ x0 b) m) (+ y0 d11)) (list (+ x0 b) (+ y0 d22)) )
(command "line"(list x0 (- y0 d22)) (list (+ x0 m) (- y0 d11)) (list (- (+ x0 b) m) (- y0 d11)) (list (+ x0 b) (- y0 d22)) )
(command "layer" "s" "2" " ")
(setq a d)
(setq a1 d1)
(setq a2 d2)
(setq a3 (+ d 8))
(setq a4 b)
(setq d (itoa d) d1 (itoa d1) d2 (itoa d2) b (itoa b) c (itoa (+ d 8)))
(setq d (strcat "%%c" d) d1 (strcat "%%c" d1) d2 (strcat "%%c" d2) c (strcat "%%c" c))
(command "dim")
(command "dimtxt" "8")
(command "hor"(list x0 y0) (list (+ x0 b) y0) (list x0 (- y0 d11 14)) b)
(command "ver"(list x0 (- y0 d00)) (list x0 (+ y0 d00)) (list (+ x0 (/ a4 2.0)) y0) d)
(command "ver"(list x0 (- y0 d11)) (list x0 (+ y0 d11)) (list (+ x0 a4 30) y0) d1)
(command "ver"(list x0 (- y0 d22)) (list x0 (+ y0 d22)) (list (+ x0 a4 20) y0) d2)
(command "ver"(list x0 (- y0 d00)) (list x0 (+ y0 d00 8)) (list (+ x0 a4 10) y0) c)
(command "exit")
)
运行时总说“; 错误:输入的列表有缺陷”
(defun geer(x0 y0)
(setq m (getreal "\n please input m:" )
z (getint "\n please input z:" )
b (getreal "\n please input b:" )
d (getreal "\n please input d:" )
)
(setq d2 ( * m z))
(setq d1 ( + d2 m) d3( - d2 m))
(setq d22 (/ d2 2.0) d11 (/ d1 2.0) d33 (/ d3 2.0) d00 (/ d 2.0))
(command "limits" (list 0 0) (list (+ x0 b 50) (+ y0 d11 50))
(command "zoom" "a")
(command "layer" "s" "3" " ")
(command "line"(list (- x0 10) y0) (list (+ x0 b 10) y0))
(command "layer" "s" "0" " ")
(command "line"(list x0 (+ y0 d00 8)) (list x0 (+ y0 d22)) (list (+ x0 b) (+ y0 d22))
(list (+ x0 b) (+ y0 d00 8)) "c")
(command "line"(list x0 (- y0 d00 2)) (list x0 (- y0 d22)) (list (+ x0 b) (- y0 d22))
(list (+ x0 b) (- y0 d00 2)) "c")
(command "layer" "s" "1" " ")
(command "hatch" "u" "45" "4" "n" "w"(list(- x0 2) (- y0 d22 2)) (list(+ x0 b 2) (+ y0 d22 2)) " ")
(command "layer" "s" "0" " ")
(command "line"(list x0 (+ y0 d00 8)) (list x0 (- y0 d00 2)))
(command "line"(list (+ x0 b) (+ y0 d00 8)) (list (+ x0 b) (- y0 d00 2)))
(command "line"(list x0 (+ y0 d00 2)) (list (+ x0 2) (+ y0 d00)) (list (- (+ x0 b) 2) (+ y0 d00))
(list (+ x0 b) (+ y0 d00 2)) )
(command "line"(list x0 (- y0 d00 2)) (list (+ x0 2) (- y0 d00)) (list (- (+ x0 b) 2) (- y0 d00)) (list (+ x0 b) (- y0 d00 2)) )
(command "line"(list (+ x0 2) (- y0 d00)) (list (+ x0 2) (+ y0 d00)) )
(command "line"(list (- (+ x0 b) 2) (- y0 d00)) (list (- (+ x0 b) 2) (+ y0 d00)) )
(command "line"(list x0 (+ y0 d22)) (list (+ x0 m) (+ y0 d11)) (list (- (+ x0 b) m) (+ y0 d11)) (list (+ x0 b) (+ y0 d22)) )
(command "line"(list x0 (- y0 d22)) (list (+ x0 m) (- y0 d11)) (list (- (+ x0 b) m) (- y0 d11)) (list (+ x0 b) (- y0 d22)) )
(command "layer" "s" "2" " ")
(setq a d)
(setq a1 d1)
(setq a2 d2)
(setq a3 (+ d 8))
(setq a4 b)
(setq d (itoa d) d1 (itoa d1) d2 (itoa d2) b (itoa b) c (itoa (+ d 8)))
(setq d (strcat "%%c" d) d1 (strcat "%%c" d1) d2 (strcat "%%c" d2) c (strcat "%%c" c))
(command "dim")
(command "dimtxt" "8")
(command "hor"(list x0 y0) (list (+ x0 b) y0) (list x0 (- y0 d11 14)) b)
(command "ver"(list x0 (- y0 d00)) (list x0 (+ y0 d00)) (list (+ x0 (/ a4 2.0)) y0) d)
(command "ver"(list x0 (- y0 d11)) (list x0 (+ y0 d11)) (list (+ x0 a4 30) y0) d1)
(command "ver"(list x0 (- y0 d22)) (list x0 (+ y0 d22)) (list (+ x0 a4 20) y0) d2)
(command "ver"(list x0 (- y0 d00)) (list x0 (+ y0 d00 8)) (list (+ x0 a4 10) y0) c)
(command "exit")
)
运行时总说“; 错误:输入的列表有缺陷”
▼优质解答
答案和解析
(command "limits" (list 0 0) (list (+ x0 b 50) (+ y0 d11 50))
有误
缺少括号
应为:(command "limits" (list 0 0) (list (+ x0 b 50) (+ y0 d11 50)))
而且你画直线的命令用的也不对,自己查书对照一下
有误
缺少括号
应为:(command "limits" (list 0 0) (list (+ x0 b 50) (+ y0 d11 50)))
而且你画直线的命令用的也不对,自己查书对照一下
看了 autolisp改错(def...的网友还看了以下:
设直线小x+y=2a-1,x^2+y^2=a^2+2a-3的交点为(x0,y0),当x0y0取最小 2020-04-25 …
中国人寿保险承保险种A/G/B/D11/D12/M(A/B/D11/D12/C)是什么意思 2020-05-14 …
中国人民财产保险的承保险种字母的含义是什么中国人民财产保险的承保险种字母的含义是什么:A/D12/ 2020-05-14 …
证明:曲面xyz=a的三次方(a>o)上任一点的切平面与三个坐标面所围成的体积为一定数答案为:曲面 2020-05-16 …
EXCELIF语句超过7层嵌套谁能帮我改改下面这个超过的语句或者有什么方法求指点=IF(B11=" 2020-05-17 …
不计免赔率M覆盖A/D12/B/D11是什么意思 2020-06-18 …
科研人员利用化学诱变剂EMS诱发水稻D11基因突变,选育出一种纯合矮秆水稻突变植株(甲).将该矮秆 2020-06-20 …
autolisp改错(defungeer(x0y0)(setqm(getreal"\nplease 2020-07-22 …
如何统计一张EXECAL表格中某个数字出现的次数?如果是使用COUNTIF函数,则=COUNTIF( 2020-11-01 …
已知直线l:ax+y=1在矩阵A=.1201.对应的变换作用下变为直线l′:x+by=1.(Ⅰ)求实 2021-01-07 …