Page 1 of 1

Persistent Bounded String

Posted: 28 February 2008, 19:26 PM
by Don_Kirby
I have verified that this code...

Code: Select all

'Maximum of 20 characters
Public Foo as PersistentString(20)
...does not limit the string to 20 characters. The device thinks it does, as it will overwrite and corrupt nearby data in EEPROMif given the chance to. Futher testing is required to determine if this is a Compiler specific issue, and if so, which compiler (hence the Beta forum post). The soonest I can try it on a VM device will be tomorrow.



-Don

Re: Persistent Bounded String

Posted: 28 February 2008, 20:15 PM
by dkinzer
The same behavior exists in the VM version as documented in the manual section on Persistent variables:
It is important to note that the implementation of the PersistentString type is identical to that of the BoundedString type and is therefore not protected from overwriting the boundaries of the data item.

Re: Persistent Bounded String

Posted: 01 March 2008, 9:01 AM
by Don_Kirby
dkinzer wrote:The same behavior exists in the VM version as documented in the manual section on Persistent variables
I knew that. Really.

Sometimes the brain is simply revving in neutral, parking brake on, and traffic is zipping on by.

-Don