plecs Posted October 17, 2014 Share Posted October 17, 2014 I say 30 variables that I want to write the values without quotation marks. * only a comma between values (setq ax1 (strcat "Euro" "," "EU7X50" "," euro)) (setq ax2 (strcat "Hol2.5x25" "," "HZ2.5X25" "," hz)) (defun c:writeacc (/ cfgfname SymList) (vl-load-com) (setq cfgfname "RaportACCESORI.txt") (setq SymList '(ax1 ax2 ax3 ax4 ax5 ax6 ax7 ax8 ax9 ax10 ax11 ax12 ax13 ax14 ax15 ax16 ax17 ax18 ax19 ax20 ax21 ax22 ax23 ax24 ax25 ax26 ax27 ax28 ax29 ax30)) (LM:WriteConfig cfgfname (mapcar 'eval SymList)) (princ) ) (princ) ;========================================================================================= (defun LM:WriteConfig ( filename lst / ofile ) (setq filename "RaportACCESORI.txt") (if (setq ofile (open filename "a")) (progn (foreach x lst (write-line (vl-prin1-to-string x) ofile)) (setq ofile (close ofile)) T ) ) ) how can I remove the quotes marks [color="red"]"Euro_7x50,EU7X50,8"[/color] [color="red"]"Hol_2.5x25,HZ2.5X25,31"[/color] nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil Quote Link to comment Share on other sites More sharing options...
Hippe013 Posted October 17, 2014 Share Posted October 17, 2014 Maybe try replacing vl-prin1-to-string with vl-princ-to-string Quote Link to comment Share on other sites More sharing options...
plecs Posted October 18, 2014 Author Share Posted October 18, 2014 thanks a lot now it's like I is well Quote Link to comment Share on other sites More sharing options...
BIGAL Posted October 18, 2014 Share Posted October 18, 2014 If all the ax? values are strings why not just (write-line x ofile) Just me but when I was taught programming and you would use variables like X Y I J K as numbers so I would do (write-line ans ofile) there is lot of old school people here and like me they would see a X as a number at first glance. Quote Link to comment Share on other sites More sharing options...
plecs Posted November 8, 2014 Author Share Posted November 8, 2014 because I did not know but it is good for your remark we must remember that Quote Link to comment Share on other sites More sharing options...
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.