Menu

#15 %i not working with hex

bad_behavior
open
5
2010-11-12
2010-11-12
Anonymous
No

I tried so read hexadecimal numbers with %i, e.g. 0XAAAA
Trio sscanf ends after the 0 and does not recongize this as number.

Expected behaviour (http://en.wikipedia.org/wiki/Scanf):
'%i' : Scan an integer as a signed number. Similar to '%d', but interprets the number as hexadecimal when preceded by "0x" and octal when preceded by "0". For example, the string "031" would be read as 31 using '%d', and 25 using '%i'.

Discussion

MongoDB Logo MongoDB