scanf %x allows leading 0x?!?

Larry Jones scjones at thor.sdrc.com
Fri May 10 08:02:36 AEST 1991


I was just surprised to discover that the %x conversion specifier
used in the *scanf functions allows the target string to have a
leading 0x or 0X.  I don't remember any discussion about it and a
few quick tests show about a 50/50 split of systems that allow it
and systems that don't.  Was that behavior specified in the SVID
or /usr/group specs, was it picked up from somewhere else, or is
it just an unaticipated feature?
----
Larry Jones, SDRC, 2000 Eastman Dr., Milford, OH  45150-2789  513-576-2070
Domain: scjones at sdrc.com             Path: uunet!sdrc!scjones
Rats.  I can't tell my gum from my Silly Putty. -- Calvin



More information about the Comp.std.c mailing list