Date: Wed, 11 Dec 1996 13:42:00 +0100 (MET) From: Miguel Murillo To: Richard Adams cc: djgpp AT delorie DOT com Subject: Re: A newbie question: out to print out value of doubles? In-Reply-To: <32a98413.1518950@news.diac.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII On Sat, 7 Dec 1996, Richard Adams wrote: > Hi. I have a question. I'm new to C. I'm writing an application that > needs the extra precison of double-length floating point numbers > rather than the single-precision float type. I'd like to be able to > print out the double-floating-point variables, but how? I have tried > the following but it doesn't work: > > #include > #include > > void main(void) > { > double a=3.125978724; > > > printf("The variable a is:\n\t"); > fprintf ("%f\n", &a); fprintf("%lf\n",a); /* Non pointer in printf, fprintf */ /* fscanf("%lf",&a); */ /* pointer in scanf, fscanf */ > > return; > } > > I get an "incompatible pointer type" warning. How can I print out the > value of a double-precision floating point variable? Any help at all > will be greatly appreciated...:) Thank you!! > > -Richard Adams > radams AT mail DOT diac DOT com > Good luck ! Miguel Murillo