Topic: FAQ? Syntax of scanf format codes. < Solved


Author: yclee@PROBLEM_WITH_INEWS_GATEWAY_FILE ()
Date: Sun, 6 Mar 1994 05:01:37 GMT
Raw View
This is the message I've received from one of the authors, Larry Miller:

> From: lmiller@aero.org
> To: joyofc@wiliki.eng.hawaii.edu, lyc@menchu.nchu.edu.tw
> Subject: Re:  Syntax of scanf format codes
> Cc: alex@aero.org

[stuff deleted]

> Your message was a bit unclear.  I think you're asking about the E and F
> conversions.  Quoting from the ANSI standard (ANSI X3.159-1989) for the
> C programming language, section 4.9.6.2 page 138:

>  "The conversion specifiers E, G, and X are also valid and behave
>  the same as, respectively, e, g, and x."

> The F format in the table is an error, as is the explanation of the E format,
> and will be fixed in the next printing.  It reflected common practice at the
> time the book was written, before the standard was official.  The correct
> format specifier for a double should be le, lf, or lg:

>  double d;
>  scanf("%lf", &d);

> Thank you for pointing out these errors.

> Larry Miller

Thank Larry for promptly reply.

And thank you all for patience to my ignorence.

YC