[Coco] Nitros9 C compiler. Printf can't print float or double values.

Walter Zambotti zambotti at iinet.net.au
Thu May 16 23:48:05 EDT 2019


Ta Bill

Should put that in C start! 

Walter 


Sent from my Xperia by Sony smartphone

---- Bill Pierce via Coco wrote ----

>To print doubles and floats in C, you must declare "pffinit()" somewhere early in your program. It's in the description of the "printf()" statement in the MicroWare C Compilers Guide (and the K&R book).
> 
> 
> 
>-----Original Message-----
>From: Walter Zambotti <zambotti at iinet.net.au>
>To: 'CoCoList for Color Computer Enthusiasts' <coco at maltedmedia.com>
>Sent: Thu, May 16, 2019 3:34 am
>Subject: [Coco] Nitros9 C compiler. Printf can't print float or double values.
>
>That's about it
>
> 
>
>double myval = 0;
>
>printf("val = %f %e %g\n", myval, myval, myval);
>
> 
>
>Just prints:
>
>val =
>
> 
>
>What gives?
>
> 
>
>Walter
>
>
>-- 
>Coco mailing list
>Coco at maltedmedia.com
>https://pairlist5.pair.net/mailman/listinfo/coco
>
>-- 
>Coco mailing list
>Coco at maltedmedia.com
>https://pairlist5.pair.net/mailman/listinfo/coco


More information about the Coco mailing list