Урок на Делфи 69. как сравнить файлы


задание на delphi. сравниваем файлы по хешу

unit Unit1;
interface
uses
Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls;
type
TForm1 = class(TForm)
Button1: TButton;
Label1: TLabel;
Label2: TLabel;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
uses md5;
procedure TForm1.Button1Click(Sender: TObject);
var
s1,s2:string;
begin
s1:=MD5DigestToStr(MD5File('md5.dcu'));
Label1.Caption:=s1;
s2:=MD5DigestToStr(MD5File('md5.pas'));
Label2.Caption:=s2;
if s1<>s2 then
ShowMessage(' ');
end;
end.



Скачать