Float to C double

Bert Freudenberg bert at impara.de
Wed Jun 14 20:09:17 UTC 2006


Am 14.06.2006 um 21:34 schrieb Bruno Luca:

> On Wed, 14 Jun 2006 20:55:07 +0200, Bert Freudenberg  
> <bert at impara.de> wrote:
>
>> Yes. Squeak Floats are double precision IEEE numbers
>
> So if i need to pass a C float i need to call the primitive with a  
> FloatArray?

No. In the case of FFI, it converts from Squeak Floats to doubles or  
floats as necessary depending on the ffi function declaration. If you  
write a plugin, you just read a double from the stack and call the  
function with a float, the conversion is inserted by the C compiler.

- Bert -




More information about the Squeak-dev mailing list