all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* converting numbers to strings in arbitrary base (up to 36)
@ 2011-03-15 18:42 Mirko
  2011-03-15 19:15 ` Pascal J. Bourguignon
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Mirko @ 2011-03-15 18:42 UTC (permalink / raw)
  To: help-gnu-emacs

Hi,

This is an elisp question:

I can specify integers in base 2-36 using #xyr..., and I can read them from a file.

But is there a way to write an integer in arbitrary base (again, 2-36) to a file?

I looked at string-to-number, format, and calc

In greater detail,

I have a file where I want to keep a counter (in base 36).
When needed, I want to open the file, read the number.
Occasionally, I want to increment the number, and write it back out.

I can handle reading and writing :-).  It is writing the base 36 that
I don't know how to handle.

Thank you,

Mirko


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

end of thread, other threads:[~2011-03-15 20:57 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-15 18:42 converting numbers to strings in arbitrary base (up to 36) Mirko
2011-03-15 19:15 ` Pascal J. Bourguignon
2011-03-15 20:57   ` Mirko
2011-03-15 19:39 ` Stefan Monnier
2011-03-15 20:47 ` Johan Bockgård

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.