home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 1999 September
/
Chip_1999-09_cd.bin
/
ctenari
/
Trejbal
/
TRELL.PAK
/
SOURCE
/
ERSD.EXE
/
BUBEX.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1999-02-28
|
2KB
|
135 lines
uses dos,crt,slova,matika;
var u,i,j,par,k,l,m,n,o,coko : integer;
radk,rad,kus,sfs,para,parb,str,smr : string;
aa,bb,cc,dd,ee,ff,gg:text;
znak:char;
begin
rad:='a.dbf';
assign(aa,'C:\trell\convert.dll');
assign(bb,'bubben');
assign(cc,'bubcen');
assign(dd,'bublen');
sfs:=fsearch('C:\trell\convert.dll',GetEnv('path'));
if not(sfs='') then
begin
reset(aa);
rewrite(bb);
rewrite(cc);
rewrite(dd);
j:=0;
k:=0;
kus:='';
while not(eof(aa)) do
begin
u:=0;
readln(aa,rad);
if ord(rad[0])=0 then rad:=' ';
if (rad[1]='-') or (rad[1]=chr(196)) then
begin
j:=j+1;
u:=1;
end;
if (j=1) and (u=0) then
begin
k:=k+1;
kus:=kus+rad;
if k=2 then
begin
rad:='';
for i:=1 to 20 do rad:=rad+kus[i];
for i:=92 to 99 do rad:=rad+kus[i];
kus:=rad+kus;
writeln(cc,kus);
rad:='';
kus:='';
k:=0;
end;
end
else
begin
if j<2 then writeln(bb,rad);
if j>1 then writeln(dd,rad);
end;
end;
close(bb);
close(aa);
close(cc);
close(dd);
sortuj('bubcen',1,28);
reset(bb);
rewrite(aa);
while not(eof(bb)) do
begin
readln(bb,rad);
kus:='';
for i:=1 to 19 do kus:=kus+rad[i];
if kus='Kategorie: Sklad:' then rad:=kus;
writeln(aa,rad);
end;
close(bb);
reset(cc);
k:=0;
str:='kdsagjsfg';
while not(eof(cc)) do
begin
readln(cc,rad);
kus:='';
for i:=29 to 84 do kus:=kus+rad[i];
smr:='';
for i:=1 to 20 do smr:=smr+kus[i];
if not(smr=str) then
begin
if k=1 then writeln(aa);
writeln(aa,smr);
end;
str:=smr;
kus:='';
k:=1;
for i:=85 to ord(rad[0]) do kus:=kus+rad[i];
writeln(aa,kus);
end;
close(cc);
reset(dd);
while not(eof(dd)) do
begin
readln(dd,rad);
writeln(aa,rad);
end;
close(dd);
close(aa);
erase(bb);
erase(cc);
erase(dd);
end; { konec dll }
end.