Persistent Bounded String

A private (members-only) forum for discussing all issues related to the Beta test of Native mode devices.
Locked
Don_Kirby
Posts: 341
Joined: 15 October 2006, 3:48 AM
Location: Long Island, New York

Persistent Bounded String

Post 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
dkinzer
Site Admin
Posts: 3120
Joined: 03 September 2005, 13:53 PM
Location: Portland, OR

Re: Persistent Bounded String

Post 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.
- Don Kinzer
Don_Kirby
Posts: 341
Joined: 15 October 2006, 3:48 AM
Location: Long Island, New York

Re: Persistent Bounded String

Post 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
Locked