delphi7中的语句:
if pos('Form111',strpas(@szText))<>0 then
在delphi xe中编译出错:
[DCC Error] Unit1.pas(84): E2251 Ambiguous overloaded call to 'StrPas'
SysUtils.pas(8723): Related method: function StrPas(const PAnsiChar): AnsiString;
SysUtils.pas(8728): Related method: function StrPas(const PWideChar): string;
在XE里可以这样用:
if pos('Form111', PChar(@szText))<>0 then
本文探讨了从 Delphi 7 升级到 Delphi XE 后,使用 StrPas 函数时出现的编译错误问题。具体错误为 StrPas 函数重载调用不明确,并提供了两种解决方法。
619

被折叠的 条评论
为什么被折叠?



