Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!taumet!steve From: steve@taumet.com (Stephen Clamage) Newsgroups: comp.std.c Subject: Re: scanf %x allows leading 0x?!? Message-ID: <725@taumet.com> Date: 11 May 91 19:36:26 GMT References: <161@thor.sdrc.com> Organization: Taumetric Corporation, San Diego Lines: 15 scjones@thor.sdrc.com (Larry Jones) writes: |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? It is the explicitly-specified behavior in ANSI C. On systems which do not follow the ANSI standard, you may get different behavior. -- Steve Clamage, TauMetric Corp, steve@taumet.com