Re: scanf to handle double



Red Dragon wrote:
> Mike Wahler wrote:
>
>> scanf("%lf", &a);
>
> With your help I learnt something today.

Note that printf still uses "%f" for doubles. Don't try using
"%lf" with printf as it may not work.

.



Relevant Pages

  • Re: scanf to handle double
    ... > Red Dragon wrote: ... >> Mike Wahler wrote: ... >> With your help I learnt something today. ... > Note that printf still uses "%f" for doubles. ...
    (comp.lang.c)
  • Re: standard libraries
    ... long doubles with 80 bits, and CRTDLL.DLL, the run time library ... changing a DLL, and broke working software as a result. ... of printf, examine them for long double access, and pass them on ... I leave the hairy details to Jacob. ...
    (comp.lang.c)
  • Re: standard libraries
    ... long doubles with 80 bits, and CRTDLL.DLL, the run time library ... of printf, examine them for long double access, and pass them on ... and long double precision as possible. ... You can print qfloats just with ...
    (comp.lang.c)
  • Re: standard libraries
    ... C89 and doesn't provide any way of printing either ... long doubles, long longs or any normal printf directives. ... That's a contradiction. ...
    (comp.lang.c)
  • Re: weirdness of scanf
    ... But that's because floats ... >printf-family functions still see doubles, ... %lf in printf is no longer undefined behaviour, ... Dan Pop ...
    (comp.lang.c)