Sven Barth schrieb:
>> String is generic so it can be pchar, shortstring or ansistring or ....
> Please note that String can NEVER be PChar (though there is assignment compatibility between the two to some extent). The possible types for String are ShortString, AnsiString and maybe in the future (and in Delphi 2009+) UnicodeString.

So what? Can it NEVER be PChar or just SOMETIMES?
A small test program
----------------
procedure XTest(X : String);
begin
X := 'AA';
end;

var S : String;
     P : pchar;

begin
P := 'TEST';
S := P;
XTest(P);
end.
----------------
compiles without errors


--
_______________________________________________
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to