Xcode Debugger Hover over variable, what does '\ <some stuff> ' mean?
In 开发者_StackOverflow中文版Xcode (v3.1) debugger if I hover over a struct variable such as sockaddr_in
I see:
alt text http://img43.imageshack.us/img43/756/picture3ac.png
Notice the difference between sin_port
and sin_family
/sin_len
. What is the meaning of '\002'
in the case of sin_family
. Why is it not displayed as just "2"?
'\002'
means 02
interpreted as an octal (base 8) number, similar to how '\x02'
would be the same for a hex (base 16) number. As to why X-Code still uses octal, I'm stumped...
The reason it's only displaying octal representations for those variables is because they are declared as char
's. This still doesn't explain the 'why octal' question, but it does answer the 'why' one.
精彩评论