"%#s"?

T. William Wells bill at proxftl.UUCP
Thu Jun 16 03:40:38 AEST 1988


In article <1043 at cresswell.quintus.UUCP>, ok at quintus.UUCP (Richard A. O'Keefe) writes:
> I think we can describe the proposed effect of %#c quite succinctly:
> it writes the shortest sequence <S> of isprint() characters such that
> both '<S>' and "<S>" would be legal C constants for which the '<S>'
> version would have the same value as its argument, preferring symbolic
> forms such as \a to octal forms such as \7.

You do not want to use short octal escape sequences because the
string "\a0" could be output as "\70" which is ambiguous.  For
similar reasons, if X3J11 leaves in the unlimited length for
"\x", those can't be used.



More information about the Comp.lang.c mailing list