помогите доделать код
unit proect;

{$mode objfpc}{$H+}

interface
uses
Classes, SysUtils, FileUtil, TAGraph, TASeries,Forms,
Controls, Graphics, Dialogs, StdCtrls, ExtCtrls;

type

{ TForm1 }
TForm1 = class(TForm)
Button1: TButton;
Chart1: TChart;
Image5: TImage;
Image6: TImage;
Label14: TLabel;
Label15: TLabel;
SinSeries2: TLineSeries;
CosSeries2: TLineSeries;
Edit3: TEdit;
Edit4: TEdit;
Edit1: TEdit;
Edit2: TEdit;
Image1: TImage;
Image2: TImage;
Image3: TImage;
Image4: TImage;
Label1: TLabel;
Label10: TLabel;
Label11: TLabel;
Label12: TLabel;
Label13: TLabel;
Label2: TLabel;
Label3: TLabel;
Label4: TLabel;
Label5: TLabel;
Label6: TLabel;
Label7: TLabel;
Label8: TLabel;
Label9: TLabel;
Shape1: TShape;
SinSeries: TLineSeries;
CosSeries: TLineSeries;
SinCosSeries: TLineSeries;
procedure Button1Click(Sender: TObject);
private
{ private declarations }
public
{ public declarations }
end;
var
Form1: TForm1;


implementation

{$R *.lfm}

{ TForm1 }
procedure TForm1.Button1Click(Sender: TObject);
const
N = 100;
MIN = -5;
MAX = 5;
var
x: Double;
a,b,c,d,i: Integer;
begin
//чистка предыдущих графиков
//считываем переменные с клавиатуры
a:=StrToInt(Edit1.Text);
b:=StrToInt(Edit2.Text);
c:=StrToInt(Edit3.Text);
d:=StrToInt(Edit4.Text);
for i:=0 to N-1 do
begin
//Задаем для графиков площадь
x := MIN + (MAX - MIN) * i /(N - 1);
//Рисуем графики
SinSeries.AddXY(x, (a*x+b));
CosSeries.AddXY(x, (d*x*x));
SinCosSeries.AddXY(x,(c/x));
SinSeries2.AddXY(x, sin(x));
CosSeries2.AddXY(x, cos(x));
end;
end.
ошибка: Fatal: Syntax error, "BEGIN" expected but "end of file" found
Lazarus.
Please enter comments
Please enter your name.
Please enter the correct email address.
You must agree before submitting.

Answers & Comments


Copyright © 2024 SCHOLAR.TIPS - All rights reserved.