delphi xe 不支持这种写法,该如何解决
delphi xe 不支持这种写法Delphi(Pascal) codefunction TSysCommon.IsEnCase(Vaules:String):boolean//判
delphi xe 不支持这种写法
Delphi(Pascal) codefunction 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以前版本是被支持的