In addition to what Mattias has said,
the following works pretty well:

Program StrTest;
Var a:Pchar;
Begin
a:=PChar(nil);
Reallocmem(a,20);  //ko
a[0] := 'A';
a[1] := 'n';
a[2] := 't';
a[3] := Chr(0);
WriteLn('Done: ', a);
End.

Anton
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to