Start Back Next End
  
ZBasic System Library
219
ZBasic Microcontrollers
PersistentPeek
Type
Function returning Byte
Invocation
PersistentPeek(address)
Parameter
Method
Type
Description
address
ByVal
int16
The persistent memory address from which to read.
Discussion
This function will return the content of the specified persistent memory address.
The address of any persistent variable can also be obtained using the DataAddress property.  For
persistent variables, the DataAddress property is of type UnsignedInteger.
Example
Dim pi as PersistentInteger
Dim b as Byte
b = PersistentPeek(1000)
b = PersistentPeek(pi.DataAddress + 1)
The second use of PersistentPeek() demonstrates how you can use the DataAddress property to
read a byte value from any part of a persistent variable of any type.
Compatibility
BasicX does not support the use of the DataAddress property for persistent items.
The BasicX system has only 512 bytes of persistent memory.  In ZBasic, the amount of persistent
memory available depends on the particular target device; the first 32 bytes of persistent memory are
reserved for system use.
See Also
Previous page Top Next page