Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!cbatt!cbosgd!ucbvax!ucsfcgl!kneller From: kneller@ucsfcgl.UUCP (Don Kneller%Langridge) Newsgroups: net.lang.c Subject: Re: Using SCANF with DOUBLE precision variables... Message-ID: <9939@cgl.ucsf.edu.ucsfcgl.UUCP> Date: Mon, 29-Sep-86 03:18:50 EDT Article-I.D.: cgl.9939 Posted: Mon Sep 29 03:18:50 1986 Date-Received: Tue, 30-Sep-86 20:22:31 EDT Reply-To: kneller@cgl.ucsf.edu.UUCP (Don Kneller%Langridge) Organization: Computer Graphics Laboratory, UCSF Lines: 18 In article <22@orion.UUCP> vaughan@orion.UUCP (Robert Vaughan) writes: >>> I have been wanting to read in some real numbers, preferably thru SCANF >>> ... >>> declared as DOUBLE. (...) > >double foo; > > scanf("%lf",&foo); > Except, of course, in the infinite wisdom of Silicon Graphics whose floats and doubles are the same size so one must use %f for both. The "justification" is that they have yet another floating point type called long float with gets the %lf format. It's painfully nonportable. Sigh. -- Don Kneller UUCP: ...ucbvax!ucsfcgl!kneller ARPA: kneller@cgl.ucsf.edu BITNET: kneller@ucsfcgl.BITNET