Integrated Application Platform › Forums › General › Writing a file with hex values › Reply To: Writing a file with hex values
August 6, 2017 at 1:13 pm
#1319
Keymaster
The trick is to write a string containing the bytes you want to output.
e.g. f.Write('\x0d\x06')
Note: You need to get the byte order correct i.e. it might need to be \x06\x0d
The upcoming change in Suneido is that it will not automatically convert strings to number e.g. for arithmetic. However, literal numbers like 0x0D06 will still be handled. 0x0d06 and 3334 are just different representations for the same underlying number.