User forums > General (but related to Code::Blocks)
What are these "\002", "\252" I'm observing when debbuging?
(1/1)
Léa Massiot:
Hello,
Thank you for reading my post and sorry for the lame thread title.
I am manipulating bytes arrays like for instance:
--- Code: ---char bytesArray[10];
--- End code ---
When I debug my code and visualize the contents of such an array using the C::B "Watch" functionality, I observe such "things" as:
"\002", "\252", etc.
If I do a:
--- Code: ---printf("B0 = %x\n", bytesArray[i] & 0xff);
--- End code ---
where i is the index of the char "\252" in bytesArray,
I get AA16 which is what I'm expecting.
Yet, I don't understand what is this "\252" code. What is it?
Given such a "code", how can I manually get the corresponding hexadecimal and even binary form?
I there a table somewhere? Does this table have a name?
Thank you for helping.
Best regards.
Léa Massiot:
This is octal notation.
Best regards.
Freem:
If you use watches, you can "convert" it to hexadecimal or decimal in it's properties. (right click on the watch, properties, then specify something in format)
Léa Massiot:
All right!
Very good. Thank you :)
Navigation
[0] Message Index
Go to full version