我知下面程序为判断文件FileName是否有属情,但为什么这样写,
FileGetAttr(FileName)意思是返回文件属性,Attr意思是属性;
文件属性(and)与属性(=)等于属性,与判断文件FileName是否有属情有什么关系?
function HasAttr(const FileName:string; Attr:word):boolean;
begin
Result:=(FileGetAttr(FileName) and Attr)=Attr;
end;
FileGetAttr(FileName)意思是返回文件属性,Attr意思是属性;
文件属性(and)与属性(=)等于属性,与判断文件FileName是否有属情有什么关系?
function HasAttr(const FileName:string; Attr:word):boolean;
begin
Result:=(FileGetAttr(FileName) and Attr)=Attr;
end;
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货