Welcome, guest! Login / Register - Why register?
Psst.. new poll here.
Psst.. new forums here.
Microsoft is blocking us again (TY IP Reputation!) so just use oauth login instead. :)

Paste

Pasted by index ( 15 years ago )
procedure  addindex (x,i:integer); forward;

procedure vvodlist (var spis1:List);
var
 tmp:List;
 x:integer;
 f:text;
begin
 assign(f,'L14_spis.txt');
 reset(f);
 while not eof(f) do
 begin
  read(f,x);
  if spis1=nil then
  begin
   GetMem(spis1,sizeof(TList));
   tmp^.data:=x;
   tmp:=spis1;
 end
 else
 begin
  tmp:=spis1;
  while tmp^.next<>nil do
  tmp:=tmp^.next;
  GetMem(tmp^.next,sizeof(TList));
  tmp:=tmp^.next;
 end;
 tmp^.next:=nil;
 Tmp^.data:=x;
 n:=0;
 for k:=1 to 10 do
  addindex(k,k);
 end;
 close(f);
end;

procedure addindex;
var
 j:integer;
 tmp:List;
begin
 if(i>0) and (i<n+1) then
 begin
  tmp^.index:=x;
 end;
 n:=n+1;
end;

 

Revise this Paste

Your Name: Code Language: