Memory.Move

Memory.Move ( 

number  SourceMemory,

number  DestinationMemory,

number  Length )

Description

Copy a memory area starting from the SourceMemory (the start memory address) to the DestinationMemory (address of the destination memory) with the specified length (in bytes). Unlike Memory.Copy(), the source and destinations memory area can overlap. Memory.Move() is slower than Memory.Copy(), so it's better to use it only when necessary.

Parameters

SourceMemory

(number) Address of SourceMemory.

DestinationMemory

(number) Address of DestinationMemory.

Length

(number) Specified length (in bytes) if you want all bytes copys set it -1.

Returns

Nothing.

Example

mem = Memory.Allocate(1024) mem2 = Memory.Allocate(1024) Memory.PutString(mem, "AMSWaves", -1, "Ascii") Memory.Move(mem, mem2, -1); Dialog.Message("Memory Moved", Memory.GetString(mem2, -1, "Ascii")) Memory.Free(mem) Memory.Free(mem2)

See also:  Related Actions

Сайт управляется системой uCoz