[fpc-devel] Re: FPC 2.2.4 rc1 Copy() function issue?

Thaddy thaddy at thaddy.com
Fri Mar 13 18:25:33 CET 2009

Sooky Boo wrote:
> Found a solution.
> Copy() only works for one level deep and since using fpc 2.2.4 the 
> array became two levels deep.
> Solution copy array A to array B using copy, then for each element of 
> array B copy nested array from A to B.
> ------------------------------------------------------------------------
> _______________________________________________
> fpc-devel maillist  -  fpc-devel at lists.freepascal.org
> http://lists.freepascal.org/mailman/listinfo/fpc-devel
But that is not a bug: that is by design and is also the way Delphi (and 
other languages) should and do behave..
Only a record with simple types (incl. shortstrings) are fully copied 
with a move(). Not pointer dependencies.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20090313/f7ad1839/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3309 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20090313/f7ad1839/attachment.bin>

More information about the fpc-devel mailing list