[Implemented] MoveMemory/FillMemory

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
freedimension
Enthusiast
Enthusiast
Posts: 613
Joined: Tue May 06, 2003 2:50 pm
Location: Germany
Contact:

[Implemented] MoveMemory/FillMemory

Post by freedimension »

The MoveMemory-Command could come very handy if you try to move a memory block to a destination that is part of the memory block itself (i.e. it's overlapping). Source->Buffer->Dest instead of Source->Dest

Code: Select all

MoveMemory(*a, *a+5, 50) ;shifting 50 Bytes 5 Bytes to the right
FillMemory should fill a specified length of Bytes with a given number.

Code: Select all

FillMemory(*a, 0, 50) ;Filling 50 zeros into *a