Hi all.
I'm getting crazy with old software (Delphi 2006) port to Sydney about AnsiPos of an AnsiString:
function TTCPBin01.GetTargetAnswer: AnsiString;
begin
Result := FTargetAnswer;
end;
..
..
if AnsiPos('?y', GetTargetAnswer) <> 0 then
begin
FErrorCode := sigc_None;
FErrorMessage := SignalMessage(FErrorCode);
Result := qmct_Prog;
end
GetTargetAnswer return an AnsiString.
Also using AnsiPos to check for a substring in the resulting string the compiler notice me:
[dcc32 Warning] osTCPBin01.pas(224): W1057 Implicit string cast from 'AnsiString' to 'string'.
Placing the mouse cursor on AnsiPos the HINT some time notice me:
function (const SubStr: string; const S: string): Integer;
Other times notice me:
function (const SubStr: AnsiString; const S: AnsiString): Integer;
In either case however the compiler notice Implicit cast...
Have you any suggestion about?
Best regards
Silverio Diquigiovanni