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/

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to