help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

mapconcat + format problem


From: Peter Tury
Subject: mapconcat + format problem
Date: Fri, 08 Jun 2007 09:25:38 -0000
User-agent: G2/1.0

Hi,

I found that

(mapconcat (lambda (n)
             (format "%c" n))
           (number-sequence start end)
           "")

gives different results for charcters after ~160 depending on `start':
if `start' is 0 then I get "readable" results, but otherwise I get the
characters' octal code. E.g. after

(defun to-string (start end)
  (mapconcat (lambda (n)
               (format "%c" n))
             (number-sequence start end)
             ""))

(equal (substring (to-string 0 190) 1)
       (substring (to-string 1 190) 0))

results nil. Why?

I don't see differences if I use `concat' instead of (mapconcat (...
(format:

(concat (number-sequence 0 190))
and
(concat (number-sequence 1 190))

seems to work consistently (gives octal codes).

What is the problem with the mapconcat solution?

Thanks,
P



reply via email to

[Prev in Thread] Current Thread [Next in Thread]