Navigation:  Reference > Functions By Category > Peek and Poke >

PeekByte()

Previous pageReturn to chapter overviewNext page

Retrieve the value of one or more BYTEs from the memory buffer pointed by <pMem> starting at the position <nShift>.

 

Syntax:

PeekByte(<pMem>,[[@]<nShift>]) -> <nByteValue>

PeekByte(<pMem>,[[@]<nShift>], <nItems>) -> <aBytes>

 

Parameters:

 

<pMem>

Base pointer to the memory buffer.

 

<nShift>

Zero based starting position within <pMem>. Is this parameter is passed by reference will be increased with the number of bytes retrieved, to reuse it in subsequent calls to Peek...() functions.

<nItems>

Number of BYTE values to read and store as numeric elements of the returned array.

 

Return Value:

Depending on the syntax used Peekbyte() can return the following values:

<nByteValue> Numeric value of the BYTE pointed by <pMem> + <nShift>
<aBytes>     Array of <nItems> elements containing the retrieved BYTEs.