
展开全部
function IsEnCase(Vaule:String):boolean; //判断Vaule 是不是字母
var
i:integer;
begin
result:=true; //设置返回值为 是
Vaule:=trim(Vaule); //去空格
for i:=1 to length(Vaule) do //准备循环
begin
if (not Vaule[i] in ['A'..'Z']) or
(not Vaule[i] in ['a'..'z']) then //如果Vaule的第i个字不是A-Z或者a-z中的任一个
begin
result:=false; //返回值 不是
exit; //退出函数
end;
end;
end;
var
i:integer;
begin
result:=true; //设置返回值为 是
Vaule:=trim(Vaule); //去空格
for i:=1 to length(Vaule) do //准备循环
begin
if (not Vaule[i] in ['A'..'Z']) or
(not Vaule[i] in ['a'..'z']) then //如果Vaule的第i个字不是A-Z或者a-z中的任一个
begin
result:=false; //返回值 不是
exit; //退出函数
end;
end;
end;
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询