Помогите, почему не работает программа на Delphi
Программа функции одной переменной
unit Unit2;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, ExtCtrls;
type
TForm2 = class(TForm)
Button1: TButton;
LabeledEdit1: TLabeledEdit;
LabeledEdit2: TLabeledEdit;
LabeledEdit3: TLabeledEdit;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form2: TForm2;
var x,y,dx,i:real;
m:integer;
implementation
{$R *.dfm}
procedure TForm2.Button1Click(Sender: TObject);
begin
x:=strtoint(LabeledEdit1.Text);
y:=strtoint(LabeledEdit2.Text);
m:=strtoint(LabeledEdit3.text);
while x<=20 do begin
y:=sin(x);
Canvas.Pixels[ClientWidth div 2 + Round (x*m),
ClientHeight div 2 - Round(y*m)]:=clBlue;
x:=x+dx;
end;
end;
end.