Hi Christophe,

On Sun, Sep 14, 2014 at 10:07:21PM +0200, Christophe Gragnic wrote:
> I was wondering how easy it was to pass floats to java libs from Ersatz,
> and also maybe receive some and rescale them to ints.

I haven't used Ersatz since quite some time, and forgot most of the
details. But have you found

   http://picolisp.com/wiki/?ErsatzReflection

which gives a basic intro? Most notably the type conversion functions at
the end, e.g. (double: 'num 'cnt) ...

   : (setq X (double: 123456 2))
   -> $Double

   : (java X 2)
   -> 123456


Other examples for related operations, also with inline Java code or
calling system libraries, are in RosettaCode, like

   http://rosettacode.org/wiki/Animation
   http://rosettacode.org/wiki/GUI/Maximum_window_dimensions
   http://rosettacode.org/wiki/Image_Noise
   http://rosettacode.org/wiki/Window_management

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

Reply via email to