Yes, integer literals are longs by default in 1.3. As noted, this works:
(aset-int (make-array Integer/TYPE 3 4 5) 1 2 3 -1)
My intuition says this should work as well, but it doesn't:
(aset ^ints (make-array Integer/TYPE 3 4 5) 1 2 3 (int -1))
IllegalArgumentException argument type
> (aset (make-array Integer/TYPE 3 4 5) 1 2 3 -1)
> can anybody tell me as to how to do this right?
>
> (aset (make-array Long/TYPE 3 4 5) 1 2 3 -1)
I *think* that number by default are long, and the array is of ints.
HTH,
--
Miki
http://clojurewise.blogspot.com/
--
You received this messag
Sorry I should have written 1.3.0-master-SNAPSHOT or whatever the
convention is that represents the latest master build :)
On Fri, Dec 31, 2010 at 11:21 AM, Sunil S Nandihalli
wrote:
> Hi Allen ..
> is 1.3.0 out? and I did not know that aset had so many variants.. glad I
> asked .. now I know .
Hi Allen ..
is 1.3.0 out? and I did not know that aset had so many variants.. glad I
asked .. now I know .. :) thanks Allen.
Sunil.
On Fri, Dec 31, 2010 at 8:19 PM, Allen Johnson wrote:
> This worked for me on 1.3.0:
>
> (aset-int (make-array Integer/TYPE 3 4 5) 1 2 3 -1)
>
> Might have somethin
This worked for me on 1.3.0:
(aset-int (make-array Integer/TYPE 3 4 5) 1 2 3 -1)
Might have something to do with the enhanced primitive support which
causes array handling to be stricter than it was in 1.2? Just a guess.
Allen
On Fri, Dec 31, 2010 at 8:53 AM, Sunil S Nandihalli
wrote:
> Hello
Hello Everybody,
why does this give an error in clojure-1.3-alpha4
(aset (make-array Integer/TYPE 3 4 5) 1 2 3 -1)
can anybody tell me as to how to do this right?
Thanks,
Sunil.
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group,