Yes - it's as you say, and I hinted above - Storage was designed for more of a 'linear' write - starting from 0 and moving on.
The issue is that when you have an Espruino C function that takes an integer, if there is no integer supplied the value is 0 - so Espruino has no way of knowing the difference between these two:
st.write("f",'xyz',0)
st.write("f",'xyz')
I guess it could be re-written to use a JsVar and check if the variable is undefined though - this just seems like a pretty small edge case
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 - it's as you say, and I hinted above - Storage was designed for more of a 'linear' write - starting from 0 and moving on.
The issue is that when you have an Espruino C function that takes an integer, if there is no integer supplied the value is 0 - so Espruino has no way of knowing the difference between these two:
I guess it could be re-written to use a JsVar and check if the variable is undefined though - this just seems like a pretty small edge case