On 02/19/2012 03:38 PM, Mattias Gaertner wrote:
Hi,
When I use "copy" on a PChar (e.g. copy(p,1,1)), it is very slow,
because the compiler converts the PChar to a string.
Is there already a function for PChar?
How should it work ?
A Phar as a left value sets the pointer to some (hopefully sensible)
memory location. for a string resulting from "copy" such memory would
need to be allocated.
IMHO implicitly doing a malloc() and propagate the need to free the
memory allocation to the user is very ambiguous.
-Michael
_______________________________________________
fpc-devel maillist - fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel