Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10.2 9/18/84 exptools; site whuxl.UUCP
Path: utzoo!linus!decvax!tektronix!uw-beaver!cornell!vax135!houxm!whuxl!mike
From: mike@whuxl.UUCP (BALDWIN)
Newsgroups: net.lang.c
Subject: Re: how has C bitten you?
Message-ID: <695@whuxl.UUCP>
Date: Wed, 14-Aug-85 18:06:27 EDT
Article-I.D.: whuxl.695
Posted: Wed Aug 14 18:06:27 1985
Date-Received: Mon, 19-Aug-85 23:44:52 EDT
References: <505@brl-tgr.ARPA> <860@turtlevax.UUCP>
Organization: AT&T Bell Laboratories, Whippany
Lines: 24

> 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