Реферат: Сортировка
procedure fReWrite(var w: tfile);
procedure fReset(var w: tfile);
procedure fPut(var w: tfile; d: using);
procedure fGet(var w: tfile; var d: using);
procedure fClose(var w: tfile);
function fEof(var w: tfile): boolean;
implementation
procedure fAssign(var w: tfile; name: string);
begin
Assign(w.f, name); w.mode:=closed;
end;
procedure fReWrite(var w: tfile); begin
if w.mode=closed then
begin
ReWrite(w.f, typesize); new(w.buf); w.count:=0; w.leng:=0; w.mode:=fwrite;
end;
end;
procedure fReset(var w: tfile); begin
if w.mode=closed then
begin
Reset(w.f, typesize); new(w.buf);
BlockRead(w.f, w.buf^, bufsize, w.leng); w.count:=1;
w.mode:=fread;
end;
end;
procedure fPut(var w: tfile; d: using);
begin
if w.mode=fwrite then
begin