unit erotates;

interface

uses
  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  StdCtrls;

type
  TForm1 = class(TForm)
    Edit1: TEdit;
    Button1: TButton;
    Label1: TLabel;
    CheckBox1: TCheckBox;
    procedure Button1Click(Sender: TObject);
  private
    { Private declarations }
    bits:integer;
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation
uses erotaind;

{$R *.DFM}



procedure TForm1.Button1Click(Sender: TObject);
var p,s:string; i:integer;
    e: Erota_tyyppi;
    b:wordbool;
begin
  p := Edit1.Text;
  i := erota_eka(e,PChar(p),0,20);
  s := '';
  while ( i >= 0 ) do begin
    s := s + ' ' + IntToStr(i);
    i := erota_seuraava(e);
  end;
  Label1.Caption := s;
  b := wordbool(5);
  CheckBox1.Checked := boolean(5);
  
end;

end.
