[Coco] Nitros9 C compiler. Printf can't print float or double values.
Bill Pierce
ooogalapasooo at aol.com
Fri May 17 06:49:29 EDT 2019
Walter, I think both pffinit and pflinint are memory hogs, so you only want to include them when needed (not sure). The way I see it, anything I can leave out is a bonus when trying to work in 64k of memory. :-)
-----Original Message-----
From: Walter Zambotti <zambotti at iinet.net.au>
To: Bill Pierce via Coco <coco at maltedmedia.com>
Sent: Thu, May 16, 2019 11:48 pm
Subject: Re: [Coco] Nitros9 C compiler. Printf can't print float or double values.
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
--
Coco mailing list
Coco at maltedmedia.com
https://pairlist5.pair.net/mailman/listinfo/coco
More information about the Coco
mailing list