On Thu, Nov 12, 2009 at 6:38 PM, Robert Campbell wrote:
> C:\dev\clojure>java -cp clojure.jar clojure.lang.Repl
> Clojure 1.1.0-alpha-SNAPSHOT
> user=> (def grid1 [01 02 03 04 05 06 07])
> #'user/grid1
> user=> grid1
> [1 2 3 4 5 6 7]
> user=> (def grid2 [01 02 03 04 05 06 07 08])
> java.lang.Numb
Oh, that's pretty neat. Thanks!
On Thu, Nov 12, 2009 at 2:36 PM, Fogus wrote:
>> Why does Clojure hate 8's? :-)
>
> It doesn't. By adding a leading zero you're telling Clojure that you
> want octal numbers. There is no number 08 in octal, instead to write
> the base-10 number 8 you would use 0
> Why does Clojure hate 8's? :-)
It doesn't. By adding a leading zero you're telling Clojure that you
want octal numbers. There is no number 08 in octal, instead to write
the base-10 number 8 you would use 010 in octal.
-m
--
You received this message because you are subscribed to the Google
C:\dev\clojure>java -cp clojure.jar clojure.lang.Repl
Clojure 1.1.0-alpha-SNAPSHOT
user=> (def grid1 [01 02 03 04 05 06 07])
#'user/grid1
user=> grid1
[1 2 3 4 5 6 7]
user=> (def grid2 [01 02 03 04 05 06 07 08])
java.lang.NumberFormatException: Invalid number: 08
java.lang.Exception: Unmatched deli