delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2001/05/15/05:42:00

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin AT sources DOT redhat DOT com
Message-ID: <3B00EC22.A4A8873B@oci.unizh.ch>
Date: Tue, 15 May 2001 10:43:14 +0200
From: "D. N. Laikov" <laikov AT oci DOT unizh DOT ch>
Organization: Universitaet Zuerich
X-Mailer: Mozilla 4.74 [en] (X11; U; Linux 2.2.18 i686)
X-Accept-Language: en, ru
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: 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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019