On Wed, Jul 27, 2011 at 4:32 PM, Ken Wesson <kwess...@gmail.com> wrote: > => (.format (java.util.Formatter.) "%d" (into-array Object [(bigint 2)])) > #<Formatter 2> > > (2N isn't recognized as a BigInteger literal by Clojure 1.2, it seems.) > > In my copy of Clojure 1.2, format also seems to work: > > => (format "%d" (bigint 2)) > "2"
In Clojure 1.2: (type (bigint 2)) => java.math.BigInteger In Clojure 1.3: (type (bigint 2)) => clojure.lang.BigInt (type 2N) => clojure.lang.BigInt clojure.lang.BigInt != java.math.BigInteger which is why format no longer works. You can do this: (format "%d" (.toBigInteger 2N)) -- Sean A Corfield -- (904) 302-SEAN An Architect's View -- http://corfield.org/ World Singles, LLC. -- http://worldsingles.com/ Railo Technologies, Inc. -- http://www.getrailo.com/ "Perfection is the enemy of the good." -- Gustave Flaubert, French realist novelist (1821-1880) -- 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