From: "John M. Aldrich" Newsgroups: comp.os.msdos.djgpp Subject: Re: printf("%p"); Date: Thu, 15 Jan 1998 22:50:21 -0500 Organization: Two pounds of chaos and a pinch of salt. Lines: 28 Message-ID: <34BED8FD.4A06@cs.com> References: <3 DOT 0 DOT 16 DOT 19980115120615 DOT 36573ffa AT hem1 DOT passagen DOT se> NNTP-Posting-Host: ppp235.cs.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk Peter Palotas wrote: > > At 17.48 1998-01-14 -0800, you wrote: > >> Okay, if you say so, you should know best! Guess I'll just have to settle > >> with the ugly looking pointer then! (Why not atleast make it capital > letters!?) > > > >Why not just use "0x%08lX"? > > That wouldn't be compatible with other compilers! Well, here's an easy one: #ifdef DJGPP printf( "0x%p", p ); #else printf( "%p", p ); #endif More advanced examples are left as an exercise for the reader. -- --------------------------------------------------------------------- | John M. Aldrich | "Be wary of strong drink. It can | | aka Fighteer I | make you shoot at tax collectors-- | | mailto:fighteer AT cs DOT com | and miss." | | http://www.cs.com/fighteer | - Lazarus Long | ---------------------------------------------------------------------