Open pakhontas opened 9 years ago
As the initial value is zero, adding sizeof(float)
is no different to making it equal to sizeof(float)
. It is still moving to the byte after f
.
In this case comment to row is wrong It's not move. in this description, I think more accurately comment: https://www.arduino.cc/en/Reference/EEPROMPut (eeAddress += sizeof(float);)
Yes, the address 'pointer' is moving to the location specified by the comment. Whether its explicit or compounded is irrelevant.
If its a confusing issue, I can however certainly modify my examples to alleviate this. I have an update to my library which fixes all warnings and improves performance. I'll change this over and the documentation can be updated once proposed & accepted.
if first value of eeAddress set to not zero. code in Get() becomes wrong. If you think that just fine, of course, that is your right. but I think that + = is understandable. thank.
Of course, there is an issue if the previous address is not 0
. I guess for a newbie point of view, its always best to follow 'KISS' principles. I will update the bundled examples with my update.
Yes, it would be better for LEARNING section.
https://docs.arduino.cc/learn/built-in-libraries/eeprom#get
Now:
Need: