首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > .NET > .NET >

delphi xe 不支持这种写法,该如何解决

2012-03-14 
delphi xe 不支持这种写法Delphi(Pascal) codefunction TSysCommon.IsEnCase(Vaules:String):boolean//判

delphi xe 不支持这种写法

Delphi(Pascal) code
function TSysCommon.IsEnCase(Vaules:String):boolean;    //判断Vaule 是不是字母vari:integer;begin  result:=true;   //设置返回值为 是  Vaules:=trim(Vaules);   //去空格  for i:=1 to length(Vaules) do   //准备循环    begin      if not Vaules[i] in ['a'..'z'] then //这行报错了      begin        result:=False;        Exit;      end;    end;end;

错误信息
[DCC Error] USysCommon.pas(142): E2015 Operator not applicable to this operand type

[解决办法]
难道枚举类型不支持了????
[解决办法]
if not ( Vaules[i] in ['a'..'z']) then
注意括弧,看是不是这个问题。
这个写法我刚在D2006里面没问题。
[解决办法]
if not (Vaules[i] in ['a'..'z']) then
[解决办法]
if not in then D7以前版本是被支持的

热点排行