This is the mail archive of the
cygwin
mailing list for the Cygwin project.
fscanf "%lf" misses the "-" sign in "-5.0e+00" on cygwin 1.5.13-1
- From: "Isselmou dellahy" <disselmou at hotmail dot com>
- To: cygwin at cygwin dot com
- Date: Sat, 26 Mar 2005 12:30:09 -0600
- Subject: fscanf "%lf" misses the "-" sign in "-5.0e+00" on cygwin 1.5.13-1
- Bcc:
Hi,
I'm using cygwin 1.5.13-1 and gcc version 3.3.3 to compile the following
foo.C :
#include <stdio.h>
#include <stdlib.h>
int main()
{
FILE *ff = fopen( "foo.dat", "r");
double x;
int n = fscanf( ff, "%lf", &x);
printf( "n=%d x=%lf\n", n, x);
fclose(ff);
return 0;
}
foo.dat contains the single text line:
-5.0e+00
The compiler does'nt show any warning and when executed prints:
n=1 x=5.000000
missing the "-" sign.
As soon as you replace the line in foo.dat by "-5.0e+01", thing works better
and the sign shows up.
When you run the executable on cygwin 1.5.12-1 it works fine.
Am I doing something wrong or is this a bug in some new dlls within cygwin
1.5.13-1 ?
Thank you for any hint/help
--
Isselmou
_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today - it's FREE!
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/