devitg Posted March 21 Posted March 21 Please , I need to strip and discard all text that only represent a value , and keep text despite it have some value in. From this list (setq text+value-list(list "SUBRASANTE" "C.T.N." "SUB-BASE" "0.00" "CORTE CAJA 2" "CAJA 100%" "0.01" "0.02" "0.03" "16.59" "17.86" "18.41" "2025.81" "31421.14" "22.04" "22.39" "33.62" )) To this one (setq no-value-list (list "SUBRASANTE" "C.T.N." "SUB-BASE" "CORTE CAJA 2" "CAJA 100%") ;_ end of list ) Thanks in advance Quote
devitg Posted March 21 Author Posted March 21 4 minutes ago, mhupp said: iterate through the lisp with numberp @mhupp as I state it are nor real value it are string _$ (numberp "18.41") nil _$ Quote
devitg Posted March 21 Author Posted March 21 @mhupp Neither I can use ATOF or ATOI (atof "C.C.C. 95%") 0.0 As it return a number for a string Quote
Tsuky Posted March 21 Posted March 21 This ? (vl-remove nil (mapcar '(lambda (x) (if (eq (type (read x)) 'SYM) x)) text+value-list)) 1 Quote
devitg Posted March 21 Author Posted March 21 3 minutes ago, Tsuky said: This ? (vl-remove nil (mapcar '(lambda (x) (if (eq (type (read x)) 'SYM) x)) text+value-list)) Thanks , really a good solution. Quote
mhupp Posted March 21 Posted March 21 2 hours ago, devitg said: @mhupp as I state it are nor real value it are string _$ (numberp "18.41") nil _$ Been working in Vba to long isnumber() works on strings as well Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.