home *** CD-ROM | disk | FTP | other *** search
/ Chip 2002 September / Chip_2002-09_cd1.bin / zkuste / delphi / kompon / d123456 / STR_BIT.ZIP / 32 / AKF / Main.pas < prev   
Pascal/Delphi Source File  |  2002-07-04  |  1KB  |  59 lines

  1. unit Main;
  2.  
  3. interface
  4.  
  5. uses
  6.   Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  7.   TeeProcs, TeEngine, Chart, StdCtrls, Buttons, ExtCtrls, Series;
  8.  
  9. type
  10.   TForm1 = class(TForm)
  11.     Panel1: TPanel;
  12.     VidPosl: TEdit;
  13.     Label1: TLabel;
  14.     BitBtn1: TBitBtn;
  15.     Chart1: TChart;
  16.     Series1: TLineSeries;
  17.     procedure BitBtn1Click(Sender: TObject);
  18.   private
  19.     { Private declarations }
  20.   public
  21.     { Public declarations }
  22.   end;
  23.  
  24. var
  25.   Form1: TForm1;
  26.  
  27. implementation
  28.  
  29. {$R *.DFM}
  30.  
  31. uses strbit32;
  32.  
  33. procedure TForm1.BitBtn1Click(Sender: TObject);
  34. Var  Regb1, Regb2, Regb3 : TStr_Bit;
  35.      PrBit : byte;      I, Razm, ZnAKF : Integer;
  36. begin
  37.   // ┬Γσ±≥Φ Σαφφ√σ Σδ  ≡α±±≈σ≥α
  38.  Regb1 := TStr_Bit.Create;
  39.  Regb2 := TStr_Bit.Create;
  40.  Regb3 := TStr_Bit.Create;
  41.  Regb1.Init_Sim(VidPosl.Text);
  42.  Regb2.Init_Sim(VidPosl.Text);
  43.  With Chart1 do begin
  44.    Series1.Clear;  {╧εΣπε≥εΓΦ≥ⁿ ∩εδσ Σδ  ∩ε±≥≡εσφΦ  Σαφφ√⌡}
  45.    Razm := Regb1.Size;
  46.    For i := 0 to Razm do begin
  47.     Regb3.Copy( Regb2, 0, Razm);
  48.     Regb3.Mod2(Regb1);
  49.     ZnAKF := Razm - (2 * Regb3.Kol_ed);
  50.     Series1.Add( ZnAKF , IntTostr(i) , clTeeColor );
  51.     PrBit := Regb1[0];
  52.     Regb1.LastBitDisplase(PrBit);
  53.  end;  end;
  54.  
  55.  Regb1.Free;     Regb2.Free;    Regb3.Free;
  56. end;
  57.  
  58. end.
  59.