yes, everything in first part is expected except line 7 st.write("a","AB",0);, that should overwrite first two 255 in array to be 'A','B','\xFF','\xFF',.... instead it will truncate the file and then the size is 2 so next lines fail
but the empty string seems to work, first byte is still 255 so uninitialized, so only writing to offset zero does not work correctly even if you don't initialize first byte
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
yes, everything in first part is expected except line 7
st.write("a","AB",0);
, that should overwrite first two 255 in array to be 'A','B','\xFF','\xFF',.... instead it will truncate the file and then the size is 2 so next lines failbut the empty string seems to work, first byte is still 255 so uninitialized, so only writing to offset zero does not work correctly even if you don't initialize first byte