现在我有几个固定的字符串:aa,bb,cc,dd我想写一个方法:作用是当传入参数str不等于以上的字符串时处理一些事情。procedure getRecord(str: string);
begin
if (str<>'aa') and (str<>'bb') and (str<>'cc') and (str<>'dd') then
{do something}
end;如果不用上面的写法,还有其他更好的写法吗
begin
if (str<>'aa') and (str<>'bb') and (str<>'cc') and (str<>'dd') then
{do something}
end;如果不用上面的写法,还有其他更好的写法吗
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货