This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

scanf


Dear Colleagues,

I have found an unexpected behaviour
of the scanf family of functions in the
latest release of Cygwin:

sources.redhat.com/cygwin/setup.exe

installation from:
ftp-stud.fht-esslingen.de

Here is an example

#include <stdio.h>
int
main ()
{
  double a;
  sscanf ("1.1", "%lf", &a);
  printf ("a=%12.8lf\n", a);
  return 0;
}

The program prints        a= 11.00000000
instead of the expected  a=   1.10000000

It seems to me that scanf ignores all decimal points
in floating-point numbers.

PLEASE HELP ME!

With best wishes,
D.N. Laikov



--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]