文件属性值的运算
procedure TForm1.Button1Click(Sender: TObject);var FileRec:TSearchrec; s:String;begin s:='E:\FWGL\data.mdb'; findfirst(S,faAnyfile,FileRec); ShowMessage(S+'的属性值为:'+inttostr(FileRec.Attr)); //显示32 ShowMessage('常量 aDirectory 的值为:'+inttostr(faDirectory)); //16 if ((FileRec.Attr and faDirectory) = 0) then ShowMessage('按位与值:'+inttostr(FileRec.Attr and faDirectory)+' '+S+' 是一个文件.') else showMessage('按位与值:'+inttostr(FileRec.Attr and faDirectory)+' '+s+' 是一个文件夹');end;