Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!seismo!rutgers!ames!ucbcad!ucbvax!hoptoad!pozar From: pozar@hoptoad.uucp (Tim Pozar) Newsgroups: comp.lang.c Subject: Re: printf's %D, %O, and %X Message-ID: <2531@hoptoad.uucp> Date: Mon, 27-Jul-87 13:12:46 EDT Article-I.D.: hoptoad.2531 Posted: Mon Jul 27 13:12:46 1987 Date-Received: Tue, 28-Jul-87 05:30:58 EDT References: <1667@xanth.UUCP> Reply-To: pozar@hoptoad.UUCP (Tim Pozar) Organization: Syncstream (San Francisco) Lines: 22 In article <1667@xanth.UUCP> kyle@xanth.UUCP (Kyle Jones) writes: >For a long time now I've been under the impression that using "%D"," %O", and >"%X" in a printf() conversion spec is equivalent to using "%ld", "%lo", and >"%lx". However when I looked at the documentation for printf (4.3 BSD) I >discovered that capitalizing "%d, "%o", and "%x" are not mentioned at all. > >Do anyone know if printf() used to handle "%D", etc. as outlined above? In MSC 4.0 (I can't remember if its the case for 2 and 3 also) there is a difference with the ouput of a number using the lowercase "%x" and an uppercase "%X". With the uppercase the hex string will be in upper case (eg. 5FE), and with the lowercase the hex string will be in lowercase (eg 5fe). -- Tim Pozar UUCP pozar@hoptoad.UUCP Fido 125/406 USNail KLOK-FM 77 Maiden Lane San Francisco CA 94108