乐筑天下

搜索
欢迎各位开发者和用户入驻本平台 尊重版权,从我做起,拒绝盗版,拒绝倒卖 签到、发布资源、邀请好友注册,可以获得银币 请注意保管好自己的密码,避免账户资金被盗
楼主: flopo

[编程交流] lisp help - while

[复制链接]

28

主题

76

帖子

48

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
140
发表于 2022-7-6 09:37:04 | 显示全部楼层
Thanks guys!
Stefan, i think your first variant is exactly what i was asking for. But i will try both solutions you gave me.
回复

使用道具 举报

54

主题

3755

帖子

3583

银币

后起之秀

Rank: 20Rank: 20Rank: 20Rank: 20

铜币
438
发表于 2022-7-6 09:41:18 | 显示全部楼层
That's a lot of variables you won't be able to localize. Use this list; much cleaner and faster.
回复

使用道具 举报

pBe

32

主题

2722

帖子

2666

银币

后起之秀

Rank: 20Rank: 20Rank: 20Rank: 20

铜币
211
发表于 2022-7-6 09:43:22 | 显示全部楼层
 
The way i read your code is you already have p1,p2,p3... variables and you need to create a new variable based on whats already defined.
p1...p99
cota
pcota
 
A sub like the one i posted will create a new variable, and with the proper code you localized that 1 varaible, as a matter of fact you dont even need to assigned it to an unknown variable name.
 
(setq NewVal (MakeVar ....))
 
I used a list as the argument for member  (the variable this), i would suggest testing number of pt*  variables  (which by my understanding are already defined)  and use that as the TTL arg, where
lst is pcota
num2add  as cota
 
I dont know your reason for creating points but take Alanjts advice and use a list
as the the final result rather than unknown number of variables:
 
((1.0 2.0. 3.0)(2.0 4.0 5.0)(2.0 4.0 5.0))
instead of
p1
p2
p3
 
but this:
(setq pz8 (rtos(+ cota (- (cadr p8 (cadr pcota)))  2 2 ))).. is not creating a point value but a string value
 
Anyway. Hope this helps..
回复

使用道具 举报

发表回复

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

  • 微信公众平台

  • 扫描访问手机版

  • 点击图片下载手机App

QQ|关于我们|小黑屋|乐筑天下 繁体中文

GMT+8, 2025-3-7 08:50 , Processed in 1.450728 second(s), 56 queries .

© 2020-2025 乐筑天下

联系客服 关注微信 帮助中心 下载APP 返回顶部 返回列表