Newsgroups: comp.lang.c Path: utzoo!henry From: henry@utzoo.uucp (Henry Spencer) Subject: Re: scanf doesn't work for variables of type double Message-ID: <1989Sep15.183707.3132@utzoo.uucp> Organization: U of Toronto Zoology References: <12988@uhnix1.uh.edu> Date: Fri, 15 Sep 89 18:37:07 GMT In article <12988@uhnix1.uh.edu> jsmng@csune.cs.uh.edu () writes: >... According to K&R, %f for double should be allowed in scanf... Please read K&R more carefully. In scanf, the specification for double is %lf. In *printf*, %f works for either float or double, but in *scanf*, you have to make the distinction. -- V7 /bin/mail source: 554 lines.| Henry Spencer at U of Toronto Zoology 1989 X.400 specs: 2200+ pages. | uunet!attcan!utzoo!henry henry@zoo.toronto.edu