[fpc-pascal] Move() vs MemCopy()

Florian Klaempfl florian at freepascal.org
Tue Sep 29 15:52:24 CEST 2009


Jonas Maebe schrieb:
> 
> On 29 Sep 2009, at 15:46, Graeme Geldenhuys wrote:
> 
>> Windows has 'memcpy()', not 'memcopy()'   ;-)
> 
> memcpy() is from the C library. And the C library also has memmove(),
> for that matter.
> 
> The difference between memcpy() and memmove() is that memcpy() has
> undefined behaviour if the source and destination overlap, while
> memmove() ensures that everything always works fine.
> 
> As a result, calling the Pascal version "move" is logical.

Jonas was quicker ;(



More information about the fpc-pascal mailing list