最初由 hikatu 发布
[B](SETQ COUNTER 0
pnt-list '( (5 5 5 )(1 2 3) (1 2 3)))
(SETQ NN (LENGTH PNT-LIST)
PNT-XY PNT-LIST
)
(repeat NN
(SETQ PPP (VL-REMOVE (NTH COUNTER PNT-XY) PNT-XY))
(IF (=(NTH... [/B] 
- [FONT=courier new]
- ;;; ==================================================================
- ;;; 删除表中相同的元素
- ;;; ==================================================================
- (defun th-lst-delsame (lst)
- (if lst
- (cons (car lst) (th-lst-delsame (vl-remove (car lst) (cdr lst))))
- )
- )
- ;;; ==================================================================
- (defun tt-lst-delsame (inlst / outlst)
- (mapcar
- '(lambda (x)
- (setq outlst (cons x (vl-remove x outlst)))
- )
- inlst
- )
- (reverse outlst)
- )
- ;;; ==================================================================
- (defun hao-lst-delsame (l / item i out)
- (setq out '()
- i -1
- )
- (while (setq item (nth (setq i (1+ i))
- l
- )
- )
- (if (not (member item out))
- (setq out (cons item out))
- )
- )
- (reverse out)
- )
- ;;; ==================================================================
- [/FONT]
|