tags 905316 forwarded maxima-disc...@lists.sourceforge.net
thanks

Greetings, and thanks for your report!
=============================================================================
Dear Maintainer,

I wanted to format a list of integers in base 16, but the default output was
returned in mixed case for the letters A-F. When I added case-conversion to the
format string, maxima suddenly ends up in an infinite memory-consuming loop.
The exact same format string works in lisp within maxima.


Example:


This works as expected and prints the list as a comma-separated list of
hexadecimal integers in upper case:

> (%i1) :lisp (format t "~{0x~:@(~x~)~^, ~}~%" '(1000 2000 3000 4000) )
> 0x3E8, 0x7D0, 0xBB8, 0xFA0
> NIL
> (%i1)

while this hangs indefinitely (notice exact same string and values)

> (%i1) printf(true, "~{0x~:@(~x~)~^, ~}~%", [1000,2000,3000,4000] );


This started happening when I added the case conversion. If I remove it, the
output is as expected:

> (%i4) printf(true, "~{0x~x~^, ~}~%", [1000,2000,3000,4000] );
> 0x3E8, 0x7D0, 0xBB8, 0xFA0
> (%o4)                                false
=============================================================================

Take care,
-- 
Camm Maguire                                        c...@maguirefamily.org
==========================================================================
"The earth is but one country, and mankind its citizens."  --  Baha'u'llah

Reply via email to