Hi Samuel,

> (prinl (java "java.lang.Math" "pow" (double: 2 *Scl) (double: 3 *Scl) ) )
> ...
>                   else if (s.Obj instanceof Double)
>                      arg[i] = Array.newInstance(Double.TYPE, k);
> ...
>                else if (s.Obj instanceof Double)
>                   par[i] = Double.TYPE;
> ...

> I would then like to ask if the current behavior of the java function is
> intended,

This is a good and valid question.

Yes, the 'java' function was deliberately limited to a few basic types,
mainly for performance reasons, as we cannot arbitrarily extend the type
checking if/else sequence.

On the other hand, you are right in that the floating point values would
be rather useful. Also, the 'native' function of PicoLisp, which somehow
corresponds to the 'java' function, supports double and float arguments

So I followed your suggestion, and added the checks for 'Double' and

Also, I added a 'float:' function for type conversions, and extended
http://picolisp.com/5000/!wiki?ersatzreflection accordingly.

Many thanks for the input! As a whole, I think this is a good and
necessary extension!

♪♫ Alex
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe

Reply via email to