PeekLong - Read a LONG value from a memory address

Top  Previous  Next

Syntax

 

<nByte> := PeekLong( <nAddress> )

 

Parameters

 

<nAddress>

 

Memory address to be read. The address is a  LONGvalue.

 

Return value

 

The LONG value stored at address <nAddress> in memory.

 

Description

 

PeekLong reads the LONG value stored in memory at the given address <nAddress>.

 

Classification

 

Core

 

Category

 

Pointers and Memory

 

Quick Info

 

Library: cckptcor.lib / cckptcor.dll

 

See also

 

PokeLong, Poke, Peek

 

Example

 

 

#INCLUDE "CockpitCoreLibs.ch"

 

FUNCTION Main

 

LOCAL address

 

* Allocate some memory

address := LockNullString(4)

 

* Write some data

PokeLong(address,-123456789)

 

* Check if everything worked fine

? PeekLong(address)

 

RETURN NIL