scanf() and friends

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Michael,

not a bug but maybe worthwhile to clarify.

The man pages for the scanf() familiy of functions (scanf(), sscanf(),
fscanf(),
vscanf(), csscanf(), and vfscanf()) state that the conversion specifier
'i' accepts
'0x' or '0X' as an indication for hex numbers.

They do not mention, however, that the  conversion specifiers 'x' and
'X' also
accept (and discard) '0x' or '0X' as prefixes for hex numbers.

This lets me wonder if the fact that my glibc version accepts (and discards)
a 0x prefix in a 'X' conversion is merely a convenience that may
disappear at
some later point in time, or an intended feature on which a programmer may
rely on.

Best Regards,
Jürgen Sauermann
GNU APL




[Index of Archives]     [Kernel Documentation]     [Netdev]     [Linux Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux