Using SCANF with DOUBLE precision variables...

Chris Torek chris at umcp-cs.UUCP
Wed Oct 1 15:08:07 AEST 1986

In article <9939 at> kneller at
(Don Kneller%Langridge) writes:
>[In the] Silicon Graphics [compiler] 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.

Indeed.  It may be too late now, but they should have used `long
double', and perhaps `%llf'.  `long float' is an alias for `double'
(per K&R p. 193).  (The arrogation of `%lf' is to me more distressing
than that of `long float'.)
In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 1516)
UUCP:	seismo!umcp-cs!chris
CSNet:	chris at umcp-cs		ARPA:	chris at

More information about the Comp.lang.c mailing list