You would also include "[" in the 'echo' arguments, then check it with
(use S
(while
(prin
(setq S
(echo "[" "volume" "unadjustedVolume") ) )
(if (= "[" S)
(... step through the elements ...)
(echo ",")
(prin ".0,") ) )
I usually use
(case (echo "[" "volume" "unadjustedVolume")
("["
...)
(("volume" "unadjustedVolume")
(echo ",")
(prin ".0,") )
(NIL
... handle error case, if you like ...)
(T
... general else case ) )
No additional variable needed, and one can have readable code even when
handling many cases.
Easy to additionally handle NIL returned from (echo) - probably doesn't
matter (too unlikely) when processing a file, but probably handy when
processing a input stream from network (e.g. curl).
--
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe