FWIW, The-Scrapyard (0)% java -cp clojure.jar clojure.lang.Repl Clojure user=> 0xff 255 user=> (+ 0xff 45) 300 user=> ^D The-Scrapyard (0)% java -version java version "1.5.0_13" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_13-b05-241) Java HotSpot(TM) Client VM (build 1.5.0_13-121, mixed mode, sharing)
This on a TiBook, Mac OS X 10.4.11 with Clojure 20080916 and svn 1051. -tree On Sun, Oct 5, 2008 at 8:04 PM, Jim Menard <[EMAIL PROTECTED]> wrote: > > nimbus:/usr/local/src/Lisp/clojure> clojure > Clojure > user=> 0xff > java.lang.IllegalArgumentException: Invalid number: 0xff > java.lang.Exception: ReaderError:(2,1) Invalid number: 0xff > at clojure.lang.LispReader.read(LispReader.java:160) > at clojure.lang.Repl.main(Repl.java:68) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > at java.lang.reflect.Method.invoke(Method.java:585) > at jline.ConsoleRunner.main(ConsoleRunner.java:69) > Caused by: java.lang.IllegalArgumentException: Invalid number: 0xff > at clojure.lang.LispReader.readNumber(LispReader.java:198) > at clojure.lang.LispReader.read(LispReader.java:117) > ... 6 more > > I'm using OS X 10.5 (Leopard). I can't figure out how to determine the > version of Clojure I am using from the command line, but I believe I'm > using the latest version 20080916. > > Jim > > On Sun, Oct 5, 2008 at 6:50 PM, Vincent Foley <[EMAIL PROTECTED]> wrote: >> >> They seem to work fine with me: >> >> user=> 0xff >> 255 >> user=> (+ 0xff 45) >> 300 >> >> >> On Oct 5, 4:52 pm, "Jim Menard" <[EMAIL PROTECTED]> wrote: >>> In the section on literals athttp://clojure.org/reader, it says, >>> "Numbers - as per Java, plus ..." >>> >>> This implies to me that hex numbers like 0xff should be accepted by >>> the reader, but they are not. Is this a bug or a misunderstanding on >>> my part? >>> >>> Jim >>> -- >>> Jim Menard, [EMAIL PROTECTED], [EMAIL PROTECTED]://www.io.com/~jimm/ >> > >> > > > > -- > Jim Menard, [EMAIL PROTECTED], [EMAIL PROTECTED] > http://www.io.com/~jimm/ > > > > -- Tom Emerson [EMAIL PROTECTED] http://www.dreamersrealm.net/~tree --~--~---------~--~----~------------~-------~--~----~ 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 To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/clojure?hl=en -~----------~----~----~----~------~----~------~--~---