AM Posted December 15, 2022 Share Posted December 15, 2022 dear all, i have a basic lisp-question to FORMAT and i did not find a solution... INPUT (setf alist '((/player "12" 1.0 1.0 1.0) (/player "23" 1.0 1.0 1.0) (/player "12" 1.0 1.0 1.0) (/player "23" 1.0 1.0 1.0))) ;; with FORMAT to => /player "12" 1.0 1.0 1.0, /player "23" 1.0 1.0 1.0, /player "12" 1.0 1.0 1.0, /player "23" 1.0 1.0 1.0 by FORMAT => i will save it in a TXT-file on desktop (that works (with-open-file...)), but i have a format-problems with the commatas and the () thanx for such basic-lisp-help andré Quote Link to comment Share on other sites More sharing options...
LdBeth Posted December 18, 2022 Share Posted December 18, 2022 (format t "~{~{~S~^ ~}~^, ~}" alist) /player "12" 1.0 1.0 1.0, /player "23" 1.0 1.0 1.0, /player "12" 1.0 1.0 1.0, /player "23" 1.0 1.0 1.0 nil :: use format nil if you want the result as a string. Stephane Boussuge and opmo 2 Quote Link to comment Share on other sites More sharing options...
AM Posted December 19, 2022 Author Share Posted December 19, 2022 dear ldbeth thanks for the solution - that's great! all the best andré 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.