🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: net.lang.c
Article #9427

Re: Using SCANF with DOUBLE precision variables...

#9427
From: Don Kneller%Langridge
Date: Mon, 29 Sep 1986 07:18
18 lines
1198 bytes
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
Technical Details
Message-ID: <9939@cgl.ucsf.edu.ucsfcgl.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!watmath!clyde!cbatt!cbosgd!ucbvax!ucsfcgl!kneller

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: arc1-ca.pugleaf.net!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