FilePos.PAS

Language:
Русский
English

  {FilePos.PAS}
  ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
 {Sample code for the FilePos and FileSize functions, and the Seek
    procedure.}

  uses WinCrt;

  var
    f: file of Byte;
    size : Longint;
  begin
    { Get file name from command line }
    Assign(f, ParamStr(1));
    Reset(f);
    size := FileSize(f);
    Writeln('File size in bytes: ',size);
    Writeln('Seeking halfway into file...');
    Seek(f,size div 2);
    Writeln('Position is now ',FilePos(f));
    Close(f);
  end.

Тэги:
| G+
Код для вставки: :: :: :: ::
Поделиться: // //