View Single Post
Old 01-09-2018, 06:55 AM   #30
fundorin
Banned
 
Join Date: Feb 2014
Location: Moscow, Russia
Posts: 554
Default

// HEX string. When printed to log as string, won't show anything, until converted into string with a special function, which was written by Justin. Then, log will display "0B".
pos = "\x11";


//Regular string. When printed, will display "\x0B" in log.
position = 11;
pos2 = sprintf(#, "\\x%2X", position);

printf("%s", pos); // []
printf("%s", pos2); // \x0B
printf("%s", hex2str(pos)); // 0B

So, we have two variables, pos and pos2, containing the same value - "\x0B". The thing is that pos is determined as hex and pos2 as a string.
The question is, how to make pos2 value type as hex.
fundorin is offline   Reply With Quote