how has C bitten you?

BALDWIN mike at whuxl.UUCP
Thu Aug 15 08:06:27 AEST 1985


> The biggest mistake in the implementation of printf is a disregard to
> the standard in outputting hexadecimal and e-type output.  In the rest
> of the programming world, hexadecimal is output as (for example):
> 
> 	10AD            rather than             10ad
> 
> and floating-point e-type output as:
> 
> 	3.1415926E+00   rather than             3.141592654e+00
> 
> Some implementations of printf intrepret %E and %G to mean "use 'E'
> rather than 'e'".  Similarly, %X means "use the character set
> [0123456789ABCDEF] rather than [0123456789abcdef] to print hexadecimal
> numbers."  If you want to print out a long using cap hex, you would
> use the format specifier "%lX".
> 
> Does anyone know what the proposed ANSI standard says about this?

April 30 X3J11C uses %x -> "abcdefg", %X -> "ABCDEFG" %e -> "e",
%E -> "E", %g -> "e", %G -> "E".
-- 
						Michael Baldwin
						AT&T Bell Labs
						harpo!whuxl!mike



More information about the Comp.lang.c mailing list