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

Gene Heskett gheskett at shentel.net
Fri May 17 01:46:59 EDT 2019


On Thursday 16 May 2019 11:48:05 pm Walter Zambotti wrote:

> Ta Bill
>
> Should put that in C start!
>
> Walter
>
The reason its not automatic is that including those two calls makes the 
object about 10k bigger. So put those calls in only if you need them.
>
> 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


Cheers, Gene Heskett
-- 
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Genes Web page <http://geneslinuxbox.net:6309/gene>



More information about the Coco mailing list