From: Raymond T. <rt...@us...> - 2004-11-11 15:50:00
|
Update of /cvsroot/maxima/maxima/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6509 Modified Files: commac.lisp Log Message: Revert EXPLODE to the version in 1.14. Add a comment that the symb arg isn't always just a symbol. It can be a number too. Index: commac.lisp =================================================================== RCS file: /cvsroot/maxima/maxima/src/commac.lisp,v retrieving revision 1.17 retrieving revision 1.18 diff -u -d -r1.17 -r1.18 --- commac.lisp 19 Oct 2004 12:04:36 -0000 1.17 +++ commac.lisp 11 Nov 2004 15:49:35 -0000 1.18 @@ -553,8 +553,17 @@ sym))))))) -(defun explode (symb &aux tem) - (sloop for v on (setq tem (coerce (string symb) 'list)) +(defun list-string (strin &aux tem) + (setq tem (make-list (length (the string strin)))) + (sloop for v on tem + for i from 0 + do (setf (car v) (aref strin i))) + tem) + +(defun explode (symb &aux tem sstring) + ;; Note: symb can also be a number, not just a symbol. + (setq sstring (format nil "~S" symb)) + (sloop for v on (setq tem (list-string sstring)) do (setf (car v)(intern (string (car v))))) tem) |