View Single Post
Old 01-13-2018, 02:32 PM   #70
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 14,784
Default

Quote:
Originally Posted by fundorin View Post
I can easily convert separate numbers, like
header = 240;
instead of
header = "\xF0";
and replace %s with %c in sprintf.

But, how would one replace this string:
"\xF0\x00\x20\x29\x03\x03\x12\x00\x02\x00\x02"
with dec numbers line?

Seemingly even C does not feature a notation for decimal character definition (which logically would be "\d240"), but only octal ("\360") and hexadecimal. As EEL inherits from C supposedly this is similar, here.

Otherwise you could do something like e.g:
string = sprintf("%c%c%c%c%c%c%c%c%c%c%c%c", 240, 0, 32, 41, 3, 3, 18, 0, 2, 0, 2);


-Michael

Last edited by mschnell; 01-13-2018 at 02:47 PM.
mschnell is offline   Reply With Quote