Code:
position = 11;
pos = sprintf(str_out, "\\x%02X", position);
pos2 = "\x11";
printf(" pos - %s\n", pos);
printf(" pos2 - %s\n", pos2);
printf("strpos2 - %s\n", hex2str(pos2));
output:
Why
pos is a text string, while
pos2 is hex? What should be done to store
pos value as hex?
P.S. I've created a thread, asking how to properly convert dec numbers into hex numbers, but then I thought that the I've solved the issue and deleted that thread. Turns out, that I still need to find a way of how to convert those numbers in EEL2.
In Lua and JS it's alao possible to convert digits with tostring(10) or tostring(16). Yet, I don't understand how to make constructed string value to behave like hex value in EEL2