On Fri, Aug 20, 2010 at 3:26 PM, David Kirkman
<dkirkman@ucsd.edu> wrote:
I missed the bottom of your message!
>> Also, this works:
>> CL-USER> (jcall (jmethod "java.lang.Float" "intValue") 4.0)
>> 4
This works for you because 4.0 is the class argument to jcall, and it
ends up being passed as a java.lang.Float.
** Should the above been called as:
CL-USER> (jcall (jmethod "java.lang.Float" "intValue") 4.0s0)
instead, and then (jcall (jmethod "java.lang.Double" "intValue") 4.0d0).
You'll get an error if you try it with 4.0d0, or if you have your
*read-default-float-format* set to double.
>> but when I try this:
>> (jcall (jmethod "java.lang.Float" "compare") 4.0 5.0)
>> I get:
>> No such method: java.lang.Float.compare()
(jcall (jmethod "java.lang.Float" "compare" "float" "float") nil 4.0s0 5.0s0)
or
(jcall (jmethod "java.lang.Float" "compareTo" "java.lang.Float")
4.0s0 5.0s0)