Hi,
according to the manual AnsiStrings are 'copied on change'.
Can the compiler be forced to copy on duplication?
--- like this ---
var
s1:PChar='something';
s2:PChar;
begin
s2 := s1;
if (s1 s2) then
writeln('Okay')
else
writeln(':-( only a doubled pointer');
end;---
As an alternative I think I would have to use StrNew/StrDispose and do some pointer collection. That would be too much effort in my case...
TIA,
Marc
