Программа в среде Delphi 7.
Суть: написать программу по грунтовке и покраске забора.
То что написала:
Текст кнопки Выполнить:
s1:=StrToCurr(a.Text)*StrToCurr(h.Text);
s2:=StrToCurr(o.Text);
s3:=StrToCurr(s1/StrToCurr(g.Text));
s4:=s2*SrtToCurr(m.Text);
s5:=s3*StrToCurr(r.Text);
kol.Text:=CurrToStr(s2.Text);
kol2.Text:=CurrToStr(s3.Text);
s.Text:=CurrToStr(s4.Text);
s2.Text:=CurrToStr(s5.Text);
Выдаёт ошибку что типы не совпадают во второй строчке, может кто пояснить?
var
Form1: TForm1; s1,s2,s3,s4,s5:real;
Забыла выложить
type
TForm1 = class(TForm)
Label1: TLabel;
Label3: TLabel;
Label4: TLabel;
Label10: TLabel;
h: TEdit;
s: TEdit;
kol: TEdit;
Label8: TLabel;
a: TEdit;
Button1: TButton;
Button2: TButton;
Label5: TLabel;
Label6: TLabel;
Label7: TLabel;
Label9: TLabel;
Label11: TLabel;
o: TEdit;
r: TEdit;
m: TEdit;
g: TEdit;
Label12: TLabel;
Label13: TLabel;
s2: TEdit;
kol2: TEdit;
procedure Button2Click(Sender: TObject);
procedure Button1Click(Sender: TObject)
StrToFloat и FloatToStr не помогло, так же ошибка во второй строчке
[Error] Unit1.pas(58): Incompatible types: 'TEdit' and 'Extended'
[Error] Unit1.pas(59): There is no overloaded version of 'StrToFloat' that can be called with these arguments
[Error] Unit1.pas(60): Operator not applicable to this operand type
[Error] Unit1.pas(62): There is no overloaded version of 'FloatToStr' that can be called with these arguments
[Error] Unit1.pas(63): Record, object or class type required
[Fatal Error] Project1.dpr(6): Could not compile used unit '..\Unit1.pas'
О, в моём случае, это объём банки с краской, какого типа оно должно быть?