all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* byte-to-string
@ 2010-11-20 19:50 Chong Yidong
  2010-11-20 20:12 ` byte-to-string Harald Hanche-Olsen
  2010-11-21 17:28 ` byte-to-string Stefan Monnier
  0 siblings, 2 replies; 3+ messages in thread
From: Chong Yidong @ 2010-11-20 19:50 UTC (permalink / raw
  To: Stefan Monnier; +Cc: emacs-devel

What's the purpose of the new byte-to-string function?  I'm trying to
document it, but the docstring is uninformative about what it can be
used for.

Also, if the integer argument is supposed to be a byte, shouldn't it be
error to give it something larger than 255?  Instead the function
returns something, but I have no idea what that string represents.



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: byte-to-string
  2010-11-20 19:50 byte-to-string Chong Yidong
@ 2010-11-20 20:12 ` Harald Hanche-Olsen
  2010-11-21 17:28 ` byte-to-string Stefan Monnier
  1 sibling, 0 replies; 3+ messages in thread
From: Harald Hanche-Olsen @ 2010-11-20 20:12 UTC (permalink / raw
  To: emacs-devel

+ Chong Yidong <cyd@stupidchicken.com>:

> Also, if the integer argument is supposed to be a byte, shouldn't it be
> error to give it something larger than 255?  Instead the function
> returns something, but I have no idea what that string represents.

A bit of experimentation reveals that (byte-to-string n) returns the
same as (byte-to-string (mod n 256)). Maybe that is useful, I don't
know.

- Harald



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: byte-to-string
  2010-11-20 19:50 byte-to-string Chong Yidong
  2010-11-20 20:12 ` byte-to-string Harald Hanche-Olsen
@ 2010-11-21 17:28 ` Stefan Monnier
  1 sibling, 0 replies; 3+ messages in thread
From: Stefan Monnier @ 2010-11-21 17:28 UTC (permalink / raw
  To: Chong Yidong; +Cc: emacs-devel

> What's the purpose of the new byte-to-string function?  I'm trying to
> document it, but the docstring is uninformative about what it can be
> used for.

IIUC it's the equivalent of unibyte-string (i.e. it interprets its
128-255 arguments as bytes rather than latin-1 chars).

> Also, if the integer argument is supposed to be a byte, shouldn't it be
> error to give it something larger than 255?

I think so, yes.


        Stefan



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-11-21 17:28 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-20 19:50 byte-to-string Chong Yidong
2010-11-20 20:12 ` byte-to-string Harald Hanche-Olsen
2010-11-21 17:28 ` byte-to-string Stefan Monnier

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.