[PD-dev] I am really confused by this C problem - help?

Jamie Bullock jamie at postlude.co.uk
Mon Sep 17 09:42:41 CEST 2007


On Sun, 2007-09-16 at 12:41 +0200, federico wrote: 
> float (t_float) and int (wich you specified with %d) have an
> incompatible bit arrangement.
> 
> so it is wrong doing:
> 
>     t_float x = 8.0;
>     post("%d", x);
> 
> you surely will get an inconsistent result.
> better you do an explicit cast:
> 
>     post("%d", (int)x);

Yes, but that doesn't fix Ed's problem, using the explicit cast just
gives a different incorrect result. I had a little play with the code
and couldn't get it to work either. 

I'm also confused by the problem, and curious to know the solution...

Jamie

-- 
www.postlude.co.uk





More information about the Pd-dev mailing list