another explode bug 4.5b0 - 7.8



>>>>> "Barton" == Barton Willis <willisb@unk.edu> writes:

    Barton> This seems to be another 'explode' bug. 
    Barton> (%i1) 4.5b0 - 7.8;
    Barton> Maxima encountered a Lisp error:

    Barton>  Error in MFORMAT [or a callee]: -7.7999999999999998 is not of type 
    Barton> STRING.

Perhaps this change from version 1.14 to 1.15 of commac.lisp is the
cause:

-(defun explode (symb &aux tem sstring)
-  (setq sstring (format nil "~s" symb))
-  (sloop for v on (setq tem (list-string sstring))
+(defun explode (symb &aux tem)
+  (sloop for v on (setq tem (coerce (string symb) 'list))
 	do (setf (car v)(intern (string (car v)))))
   tem)

The original version printed symb to a string and then converted it to
a list.  This would work fine if symb were a number, but the current
change, of course, can't convert a number to a string.

On the other hand, I think exploden is intended to explode symbols and
numbers.  It's unclear exactly what the difference is supposed to be
and which one should be used.

Ray