var
a:textfile;
b:string;
c:integer;
begin
SaveDialog1.Filter := '*.asp|*.asp';
if savedialog1.execute then
begin
assignfile(a,savedialog1.FileName);
rewrite(a);
write(a,trim(memo1.text)+trim(edit1.text)+trim(memo2.Text));
b:=expandfilename(savedialog1.FileName);
c:=filegetdate(b);
showmessage(c);
//老是在这说[错误] Unit1.pas(57): Incompatible types: 'String' and 'Integer'
[致命错误] Project1.dpr(5): Could not compile used unit 'Unit1.pas'
closefile(a);
end
else
showmessage('保存出错');
end;
请问这个filegetdate用的时候是那错了?顺便说下filesetdate的例子,结合上面的说。
c:=filegetdate(b);
showmessage(inttostr(C));
按你说的改了,但现在提示是这2句都是错误。
构建
[错误] Unit1.pas(53): Incompatible types: 'Integer' and 'String'
[错误] Unit1.pas(54): Missing operator or semicolon
[错误] Unit1.pas(54): Incompatible types: 'String' and 'Integer'
[致命错误] Project1.dpr(5): Could not compile used unit 'Unit1.pas'