Copies a block of memory
MemMove dst, src, count
MemMove(dst, src, count)
The first parameter of MemMove is the address of the destination and the second one the one of the source and the third one can be a constant or, for example, the length of the source to copy.
Local a$ = "GFA Basic", b$ = Space(9)
MemMove V:b$, V:a$, 9 // This works as described
Print a$, b$
a$ = "GFA Basic", b$ = Space(9)
MemMove V:b$, V:a$, Len(b$) // This doesn't work this way...
Print a$, b$
Local a% = 1234, b%
MemMove V:b%, V:a%, SizeOf(a%)
Print a%, b%
MemMove is equal to BlockMove which can be used instead.
MemCpy is extremely efficient in copying Type variables. MemCpy is one of the rare commands that is compiled inline when count is a constant.
{Created by Sjouke Hamstra; Last updated: 16/10/2014 by James Gaite}