Path: utzoo!attcan!uunet!aplcen!uakari.primate.wisc.edu!zaphod.mps.ohio-state.edu!usc!srhqla!demott!kdq From: kdq@demott.COM (Kevin D. Quitt) Newsgroups: comp.lang.c Subject: %p and MSC Message-ID: <444@demott.COM> Date: 3 Aug 90 16:38:53 GMT Reply-To: kdq@demott.COM (Kevin D. Quitt) Organization: DeMott Electronics Co., Van Nuys CA Lines: 26 %p represents a bug in Microsoft's documentation. As I had quoted it earlier, their documentation does indicate that they are not ANSI compliant; testing, however, has indicated that MSC *is* ANSI compliant for those models where data and code have the same size pointer (S,L,H). Those models with mixed addressing modes (C,M) cause a problem because it is impossible for printf to differentiate between code and data pointers. Making the best of a bad situation, you can either coerce your pointers, or use %lp for long pointers and %Np for short. After all, if you're really going for compatibility, are you going to use a mixed model? Also, it seems to me that a program that tries to do anything significant with %p is probably not really very portable anyway. (With both hands held up over my head, and making V's with my fingers: "I am not a Microsoft apologist" ) 8-{)} -- _ Kevin D. Quitt demott!kdq kdq@demott.com DeMott Electronics Co. 14707 Keswick St. Van Nuys, CA 91405-1266 VOICE (818) 988-4975 FAX (818) 997-1190 MODEM (818) 997-4496 PEP last 96.37% of all statistics are made up.