Strings in C (Re: ambiguous ?)
Doug Gwyn
gwyn at smoke.BRL.MIL
Sat Oct 28 15:40:42 AEST 1989
In article <2756 at hub.UUCP> pete at cavevax.ucsb.edu writes:
>Actually, from previous articles I've just read, there is apparently a
>"%p...", but I'm not quite sure why this is a bad thing as long as it is
>documented correctly. I mean, on a non-Mac compiler, it's not going to
>be caught anyway.
The problem is, a standard-conforming C compiler is obliged to
treat the %p format spec as meaning "take the void* argument
and print out a representation of the pointer, suitable for
debugging etc.", not to interpret the data at that address as
a counted ("Pascal") string.
More information about the Comp.lang.c
mailing list