lisp2arx
Visual Programming for AutoLisp
Mathématiques en programmation Lisp..
doc2cpp,doc2lsp, sld2lsp, bmp2dcl,
free__GifCcapture for all-CAD'platforms..
I am looking to sort the following list ("U20" "U10" "U110" "U11" "T1" "V1" to first be sorted alphabetically then numerically so that it ends up being ("T1" "U10" "U11" "U20" "U110" "V1" this is the funtion I am currently using.
Code:
(defun SortAI (lst); = Sort Alphabetically, and within that by Integer value
(vl-sort
(vl-sort lst '(lambda (a b) (< (atoi (substr a 2)) (atoi (substr b 2)))))
'(lambda (c d) (< (substr c 1 1) (substr d 1 1)))
)
)
vla-AutoLispR14- lambda10 – poza de zauchan, in Listof AutoLisp.100 · 30.5KB
_______________________________________ psw: cea de la wjndowsXP gigabyte..
(0.816176 6.48044 10.7246 10.3981 1.90985 8.48824 1.69765 3.39529 24.2404 1.63235 22.3306 1.50176 14.7075 17.4335 13.3526 13.3526 14.5769 5.8275 1.25691 11.8019 9.30441 7.72103 8.03118 4.35838 2.17103 3.65647) I need help that 1. Which member have less than 4 than set to 4, and it will deduct from greater than 4.
Code:
(mapcar '(lambda ( x ) (cond ( (< x 4) 4 ) ( (> x 4) (- x 4) ) ( t x ) )) lst)
vla-AutoLispR14- lambda10 – poza de zauchan, in Listof AutoLisp.100 · 33KB
_______________________________________ psw: cea de la wjndowsXP gigabyte..