%p and MSC

Kevin D. Quitt kdq at demott.COM
Sat Aug 4 02:38:53 AEST 1990


    %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 at 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.



More information about the Comp.lang.c mailing list