Purpose |
Copy, Swap, or Fill blocks of memory. |
Syntax |
MEMORY COPY Source&, Dest&, Count& MEMORY SWAP Source&, Dest&, Count& MEMORY FILL Dest&, Count&, BYTE|WORD|DWORD IntegralExpr MEMORY FILL Dest&, Count&, StrgExpr |
Remarks |
The MEMORY statement may be used to copy, swap, or fill a block of memory with very high efficiency. PowerBASIC will automatically take into account the possibility that the source and destination blocks overlap and avoid corruption from that fact. In the first form, Count& bytes of memory at the address specified by Source& is copied to the address specified by Dest&. In the second form, Count& bytes of memory at the address specified by Source& is exchanged with the data at the address specified by Dest&. In the third form, Count& bytes of memory at Dest& are filled with one or more copies of the BYTE, WORD, or DWORD value specified by the value of IntegralExpr. In the fourth form, Count& bytes of memory at Dest& are filled with one or more copies of the string StrgExpr. |
See also |