2009/12/12 Amol Dharmadhikari <[email protected]>:
> Hi All,
>
> Apologies for a newbie question:
>
> I am trying to invoke some java libraries from clojure and some of the
> methods take boolean arrays as their parameters.
>
> The documentation
> (http://richhickey.github.com/clojure/clojure.core-api.html#clojure.core/boolean-array)
> does say that there is a boolean-array function. However, attempting to
> invoke this function from repl throws an exception:
> user=> (boolean-array)
> java.lang.Exception: Unable to resolve symbol: boolean-array in this context
> (NO_SOURCE_FILE:8)
>
> Am I missing something? I am using clojure version 1.0

I don't think boolean-array exists in 1.0.  Try this instead:

user=> (into-array Boolean [true true false true])
#<Boolean[] [Ljava.lang.Boolean;@15fc40c>

although that gives you an array of Booleans instead of booleans.

-- 
Michael Wood <[email protected]>

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your 
first post.
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