Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site brl-tgr.ARPA Path: utzoo!linus!philabs!cmcl2!seismo!brl-tgr!tgr!mbarker@BBNZ.ARPA From: mbarker@BBNZ.ARPA (Michael Barker) Newsgroups: net.lang.c Subject: Re: re: how has C bitten you? Message-ID: <505@brl-tgr.ARPA> Date: Thu, 8-Aug-85 10:06:39 EDT Article-I.D.: brl-tgr.505 Posted: Thu Aug 8 10:06:39 1985 Date-Received: Sun, 11-Aug-85 06:23:06 EDT Sender: news@brl-tgr.ARPA Lines: 24 ...omitted >So, printf can never get a float as an argument, it always gets a double. >Therefore, %lf or %F are meaningless to printf. > >Brian Jones aka {ihnp4,}!drutx!qwerty @ AT&T-IS Brian (et al) - the reasoning is correct, but printf could easily be changed to accept %lf or %F (or any useful convention) as formatting directions for a value with the knowledge that the value will *actually* be a double. Let's try to avoid letting the implementation details run rough-shod over the abstraction. In this case, the original poster indicated that the mnemonics are incomplete (you can't match up the type of variable and the formatting string in all cases). I think this is a very valid point. The fact that the implementation of printf will receive both types of variables as double shouldn't stop us from providing a complete set of mnemonics. "The sleep of reason produces monsters" mike ARPA: mbarker@bbnz.ARPA UUCP: harvard!bbnccv!mbarker