COPY MEMBLOCK This command will copy one section of a memblock to another section of another memblock.
Syntax
    COPY MEMBLOCK From,To,PosFrom,PosTo,Bytes
Parameters
    From
Integer The from memblock
    To
Integer The to memblock
    PosFrom
Integer The PosFrom parameter must be byte locations within the respective memblocks
    PosTo
Integer The PosTo parameter must be byte locations within the respective memblocks
    Bytes
Integer The Bytes parameter is the number of bytes you wish to copy from one memblock to the other
Returns
This command does not return a value.
Description
The From and To parameters must be existing memblocks. The PosFrom and PosTo parameters must be byte locations within the respective memblocks. The Bytes parameter is the number of bytes you wish to copy from one memblock to the other.
Example Code
    MemblockFrom=1

    MAKE MEMBLOCK MemblockFrom, 1024

    MAKE MEMBLOCK MemblockTo, 1024

    COPY MEMBLOCK MemblockFrom, MemblockTo, 0,0,1024

    rem Delete memblocks

    if MEMBLOCK EXIST(MemblockFrom)=1 then DELETE MEMBLOCK MemblockFrom

    if MEMBLOCK EXIST(MemblockTo)=1 then DELETE MEMBLOCK MemblockTo

    do

    loop

    end
See also
MEMBLOCKS Commands Menu Index