> What would the expected behavior be for pointers inside records? What if
> the record is actually a linked list? Or includes classes and objects?
> Do we run the constructor or no? If the record has file handles do we
> attempt to recreate their state? (perhaps running assign again, and
> crossing our fingers the file hasn't been deleted - which at least on
> Linux is definitely possible)

Well.
The answer is simple - value types (scalars, strings, records, variants, arrays 
of mentioned) are good functional citizens.
Cloning is well defined for them as compound value is also value. 

Should someone wants for add complexity (read OOP/pointers/classes and other 
crap) - use http://wiki.freepascal.org/management_operators#Copy at your own 
risk.

-- 
Regards,
Denis Golovan
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to