[fpc-pascal] PChar resize
Luis Fernando Del Aguila Mejía
luis3000 at ec-red.com
Wed May 11 15:31:02 CEST 2011
Hi, I have two questions about PChar.
Why Reallocmem function does not work with PChar?
How to increase the size of PChar without using Strings unit?
Thanks.
{$codepage utf8}
Var a:Pchar;
i:byte;
Begin
ReturnNilIfGrowHeapFails:=true;
a:='xxxxxxxxx';
for i:=0 to 9 do Writeln('[',i,']',a[i]);
Writeln('-------');
Reallocmem(a,20); //ko
End.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20110511/62a1dad4/attachment.html>
More information about the fpc-pascal
mailing list