On Mon, Jan 10, 2011 at 4:40 PM, WoodHacker <ramsa...@comcast.net> wrote:
> The question was how to place data in the array, not create it.   I've
> been
> doing that.   How do you populate it?    The doc shows:
>
> user=> (doc aset-float)
> -------------------------
> clojure.core/aset-float
> ([array idx val] [array idx idx2 & idxv])
>
> If I try that I get:
>
> user=> (def wa (make-array Float/TYPE 4 4))
> #'user/wa
> user=> wa
> #<float[][] [...@4cb533b8>
> user=> (aset-float wa 0 0 & 1.0)
> java.lang.Exception: Unable to resolve symbol: & in this context
> (NO_SOURCE_FILE:5)
> user=>
>
> What am I missing?

That that's not a literal ampersand expected by aset-float; just that
it can take a variable number of indices. Try (aset-float wa 0 0 1.0).

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

Reply via email to