TheSwamp
Code Red => AutoLISP (Vanilla / Visual) => Topic started by: motee-z on October 07, 2022, 07:20:25 AM
-
Hello
whow to sort a list containing equal numbers and keeping equal numbers
example
(setq lst(list 5 6 4 8 9 6 4 )
must return(9 8 6 6 5 4 4)
thanks
-
(defun _vl
-sort
( l f
/ *q
* ll ff gg
) )
)
)
( t
gg
)
)
)
)
)
)
ll
)
-
-
; Tony Tanzillo
(defun vl-sort_TT (lst func)
(mapcar
'(lambda (x) (nth x lst))
(vl-sort-i lst func)
)
)
(vl-sort_TT '(5 6 4 8 9 6 4) '>) => (9 8 6 6 5 4 4)
-
Hi,
You can have a look at this (old) topic (http://www.theswamp.org/index.php?topic=38292.msg433708#msg433708).
-
thanks for all