- (defun Class-list (&list Coding_str / n off *set_sym)
- (foreach X (vl-sort &list'(lambda (e1 e2)(<(cadr e1)(cadr e2)))) ;排序
- (setq n 1 off t);辅助
- (while off
- (setq *set_sym (read(strcat Coding_str (vl-prin1-to-string n)))) ;获取编码
- (if(eval *set_sym)
- (if(equal x (car(eval *set_sym)));两个表的对比
- (progn
- (set (read(strcat Coding_str (vl-prin1-to-string n))) (cons x (eval *set_sym)));将相同列表加入编码,并退出循环
- (setq off nil)
- )
- )
- (progn
- (set (read(strcat Coding_str (vl-prin1-to-string n))) (cons x (eval *set_sym)))
- (setq off nil)
- )
- )
- (setq n (1+ n))
- )
- )
- (princ)
- )
|