Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , 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: From: "Sonnenschein, Roland Dr." To: "'cygwin AT cygwin DOT com'" Subject: trouble using scanf on double arguments under Windows2000 Date: Tue, 2 Apr 2002 12:18:17 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id g32AIh121480 scanf() does not always work the way I think it should. Sample program: #include int main() { double dstat, ddyn; dstat=2.; scanf("%lf", &ddyn); printf("%lf %lf\n", dstat, ddyn); return 0; } usage: hugo hugo.out Sample input file hugo.in: 20.1 Output file hugo.out: 2.000000 201.000000 compilation: make hugo gcc -v yields: Reading specs from /usr/lib/gcc-lib/i686-pc-cygwin/2.95.3-4/specs gcc version 2.95.3-4 (cygwin special) Dr. Roland Sonnenschein Abt. BV1TEF Brüel & Kjaer Vibro GmbH Landwehrstraße 55 D-64293 Darmstadt Tel.: +49(0)61 51 - 32 18 99 Fax: +49(0)61 51 - 32 18 69 Email: sonne AT csd DOT de -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/