flopo 发表于 2022-7-6 08:40:21

出了什么事?帮助,p

大家好,
我想换这个
 
(setq dr1(atof d1))
(setq dr2(atof d2))
(setq dr3(atof d3))
(setq dr4(atof d4))。。。。。。。。。
...........................................
 
有了这个:
 
 
 
(setq i 1)
(重复nrpct
(套
(读取(strcat“dr”(itoa i)))
(atof(读取(strcat“d”(itoa i)))
 
)
(setq i(1+i))
)
 
 
但不起作用。为什么?有什么帮助吗?谢谢

ketxu 发表于 2022-7-6 08:46:19

nrpct的价值是多少?

pBe 发表于 2022-7-6 08:49:53

假设d1-d4是字符串
 
(atof(eval(read(strcat“d”(itoa i \k)а))))

flopo 发表于 2022-7-6 08:50:14

谢谢,Pbe

pBe 发表于 2022-7-6 08:54:46

 
不客气,弗洛波。
 
干杯

flopo 发表于 2022-7-6 08:56:23

还有这个
 
 
(setq pnr2(极性pnr1(dtr 0)dr1))
(setq pnr3(极性pnr2(dtr 0)dr2))
(setq pnr4(极性pnr3(dtr 0)dr3))
 
 
替换为:
 
(setq i 2)
(重复(-nrpct 1)
(套
(读取(strcat“pnr”(itoa i)))
(极性(eval(read(strcat“pnr”(itoa(-i 1 m)щ)))(dtr 0)(atof(read(strcat“dr”(itoa(-i 1щ)щ))))
 
 
(setq i(1+i))
)
)
 
 

pBe 发表于 2022-7-6 09:01:28

(setq i 2)
(repeat (- nrpct 1)
(set
   (read (strcat "pnr" (itoa i)))
   (polar (eval (read (strcat "pnr" (itoa (- i 1)))))
   (dtr 0)
   (atof (eval (read (strcat "dr" (itoa (- i 1))))))
   )
)
(setq i (1+ i))
)
)

flopo 发表于 2022-7-6 09:03:01

输入消息上的额外右父级。出了点问题。。。

flopo 发表于 2022-7-6 09:06:59

我试着没有最后一个右括号,但它不起作用。。。

pBe 发表于 2022-7-6 09:09:09

 
如果出现以下情况,则代码中肯定没有:
 
(setq pnr1’(-3.65852 4.79514 0.0));
(setq dr1“22”);
(setq i 2)
 

(repeat (- nrpct 1)
(set
   (read (strcat "pnr" (itoa i)))
   (polar (eval (read (strcat "pnr" (itoa (- i 1)))))
   0
   (atof (eval (read (strcat "dr" (itoa (- i 1))))))
   )
)
(setq i (1+ i))
)

 
我想在这里发布你的代码不会有什么坏处,这样这里的任何人都可以参与进来,为你找出问题所在
页: [1] 2
查看完整版本: 出了什么事?帮助,p