uses uFilter,Crt;
var tLong:tFilterLongint;
    tByte:tFilterByte;
    tWord:tFilterWord;
    tInteger:tFilterInteger;
    tSumaByte:tFilterSumaByte;
    tSumaWord:tFilterSumaWord;
    tSumaInte:tFilterSumaInteger;
    tSumaLongint:tFilterSumaLongint;
    tSumaReal:tFilterSumaReal;
    l:Longint;
    b:byte;
    w:word;
    i:integer;
    r:real;
    p:byte;
begin
repeat;
 ClrScr;
 Writeln;
 writeln('1 - Filtr - bit');
 writeln('2 - Filtr - Byte');
 writeln('3 - Filtr - Word');
 writeln('4 - Filtr - Integer');
 writeln('5 - Filtr - Longint');
 writeln;
 writeln('8 - Filtr Suma - Byte');
 writeln('9 - Filtr Suma - Word');
 writeln('10 - Filtr Suma - Integer');
 writeln('11 - Filtr Suma - Longint');
 writeln('12 - Filtr Suma - Real');
 writeln;
 writeln('99 - Konec Programu');
 readln(p);
 case p of
 5:
begin
  ClrScr;
  writeln('Filtr - Longint');
  tLong.init;
  tLong.FSetParam('CT=5 ILO=980');
  Writeln(tLong.FGetParam);
  repeat;
    readln(l);
    Writeln(tLong.FreadVal(l));
    Writeln;
  until l=9999;
end;
 2:
begin
  ClrScr;
  writeln('Filtr - Byte');
  tByte.init;
  tByte.FSetParam('CT=5 IBY=65');
  Writeln(tByte.FGetParam);
  repeat;
    readln(b);
    Writeln(tByte.FreadVal(b));
    Writeln;
  until b=99;
end;
 3:
begin
  ClrScr;
  writeln('Filtr - Word');
  tWord.init;
  tWord.FSetParam('CT=5 IWO=285');
  Writeln(tWord.FGetParam);
  repeat;
    readln(w);
    Writeln(tWord.FreadVal(w));
    Writeln;
  until w=9999;
end;
 4:
begin
  ClrScr;
  writeln('Filtr - Integer');
  tInteger.init;
  tInteger.FSetParam('CT=5 IIN=-100');
  Writeln(tInteger.FGetParam);
  repeat;
    readln(i);
    Writeln(tInteger.FreadVal(i));
    Writeln;
  until i=9999;
end;

{***********************************************************}

 8:
begin
  ClrScr;
  with tSumaByte do
    begin
      ClrScr;
      writeln('Filtr - Byte');
      init;
      FSetParam('M=0.5 IBY=200 MUL=10');
      Writeln(FGetParam);
      FSetWrite(85);
      Writeln(FGetParam);
      repeat;
        readln(b);
        Writeln(FreadVal(b));
        Writeln;
      until b=99;
   end;
  end;

 9:
begin
  ClrScr;
  writeln('Filtr - Word');
  with tSumaWord do
    begin
      init;
      FSetParam('M=0.5 IWO=200 MUL=100');
      Writeln(FGetParam);
      FSetWrite(85);
      Writeln(FGetParam);
      repeat;
        readln(w);
        Writeln(FreadVal(w));
        Writeln;
      until w=9999;
    end;
  end;
 10:
begin
  ClrScr;
  writeln('Filtr - Integer');
  with tSumaInte do
    begin
      init;
      FSetParam('M=0.5 IIN=900 MUL=10');
      Writeln(FGetParam);
      FSetWrite(85);
      Writeln(FGetParam);
      repeat;
        readln(i);
        Writeln(FreadVal(i));
        Writeln;
      until i=9999;
    end;
  end;
 11:
begin
  ClrScr;
  writeln('Filtr - Longint');
  with tSumaLongint do
    begin
      init;
      FSetParam('M=0.5 ILO=200 MUL=10');
      Writeln(FGetParam);
      FSetWrite(85);
      Writeln(FGetParam);
      repeat;
        readln(l);
        Writeln(FreadVal(l));
        Writeln;
      until l=9999;
    end;
  end;
 12:
begin
  ClrScr;
  writeln('Filtr - Real');
  with tSumaReal do
    begin
      init;
      FSetParam('M=0.5 IRE=200');
      Writeln(FGetParam);
      FSetWrite(85);
      Writeln(FGetParam);
      repeat;
        readln(r);
        Writeln(FreadVal(r));
        Writeln;
      until r=9999;
    end;
  end;
end;
until p=99;
end.
