phix - int_to_bytes
- Posted by begin Jul 12, 2018
- 1107 views
is this behavior wanted?
sequence s = int_to_bytes(1) ?s s = int_to_bytes(9) ?s
gives:
{1,0,0,0} "\t\0\0\0"
if you do that for 11 and 111 you get
{11,0,0,0} "o\0\0\0"
if you do that for 1111 and 11111 you get
{87,4,0,0} "g+\0\0"
richard