IkaMazini
08-10-2004, 11:48
Ребята этот код ошибку выдает, может вы что-то другова знайте?
TForm1.Button1Click(Sender: TObject);
[b]var
f: file of Byte;
size: Longint;
begin
if OpenDialog1.Execute then
begin
AssignFile(f, OpenDialog1.FileName);
Reset(f);
try
size := FileSize(f);
Label1.Caption := 'File Size is ' + IntToStr(size) + ' Byte';
finally
CloseFile(f);
Edit1.Text := OpenDialog3.FileName;
end;
end;
end;
Build
[Warning] Unit1.pas(131): Unsafe type 'f: file of Byte'
[Warning] Unit1.pas(132): Unsafe type 'f: file of Byte'
[Warning] Unit1.pas(134): Unsafe type 'f: file of Byte'
[Warning] Unit1.pas(137): Unsafe type 'f: file of Byte'
TForm1.Button1Click(Sender: TObject);
[b]var
f: file of Byte;
size: Longint;
begin
if OpenDialog1.Execute then
begin
AssignFile(f, OpenDialog1.FileName);
Reset(f);
try
size := FileSize(f);
Label1.Caption := 'File Size is ' + IntToStr(size) + ' Byte';
finally
CloseFile(f);
Edit1.Text := OpenDialog3.FileName;
end;
end;
end;
Build
[Warning] Unit1.pas(131): Unsafe type 'f: file of Byte'
[Warning] Unit1.pas(132): Unsafe type 'f: file of Byte'
[Warning] Unit1.pas(134): Unsafe type 'f: file of Byte'
[Warning] Unit1.pas(137): Unsafe type 'f: file of Byte'