On Thu, Jul 2, 2009 at 4:51 AM, Parth
Malwankar<parth.malwan...@gmail.com> wrote:
>
> I frequently deal with hex and binary numbers.
> As of now when I need to view a list of numbers
> I just map a little hex function to it to translate it
> into a list of hex strings at the repl.
>
>
> Having something like *print-base* / *print-radix* [1] may be
> valuable in such a scenario

I don't think Java's built-in formatter is nearly as
flexible as those, but getting hex or octal strings is easy
enough:

user=> (format "%d" 255)
"255"
user=> (format "%o" 255)
"377"
user=> (format "%x" 255)
"ff"
user=> (format "%X" 255)
"FF"

--Chouser

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to