| delorie.com/archives/browse.cgi | search |
| Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
| List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
| List-Archive: | <http://sourceware.org/ml/cygwin/> |
| List-Post: | <mailto:cygwin AT cygwin DOT com> |
| List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
| Sender: | cygwin-owner AT cygwin DOT com |
| Mail-Followup-To: | cygwin AT cygwin DOT com |
| Delivered-To: | mailing list cygwin AT cygwin DOT com |
| Message-ID: | <BAY101-F4230A4E5BA3B09CAE825B7BC420@phx.gbl> |
| X-Originating-Email: | [disselmou AT hotmail DOT com] |
| X-Sender: | disselmou AT hotmail DOT com |
| From: | "Isselmou dellahy" <disselmou AT hotmail DOT com> |
| To: | cygwin AT cygwin DOT com |
| Subject: | fscanf "%lf" misses the "-" sign in "-5.0e+00" on cygwin 1.5.13-1 |
| Date: | Sat, 26 Mar 2005 12:30:09 -0600 |
| Mime-Version: | 1.0 |
| X-OriginalArrivalTime: | 26 Mar 2005 18:30:09.0824 (UTC) FILETIME=[D7620A00:01C53231] |
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/
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |