unit1.pas(39,15) Error: Identifier not found "Edit1" lazarus / 61-Beginners ---------------------------------------------------------------------- Moon · 2023-05-19 21:29 unit Unit1; {$mode objfpc}{$H+} interface uses   Classes, SysUtils, Forms, Controls, Graphics, Dialogs, StdCtrls, math; type   { TForm1 }   TForm1 = class(TForm)     Button1: TButton;     Edit1: TEdit;     Edit2: TEdit;     Edit3: TEdit;     Edit4: TEdit;     Edit5: TEdit;     Edit6: TEdit;     Edit7: TEdit;     Edit8: TEdit;   private   public   end; var  Form1: TForm1; implementation uses    var X,Y,Fa, Fr,K6,Kt,C,L,V, p:real;    procedure TForm1.Button1Click(Sender:TObject);  begin X:=strtofloat(Edit1.Text); V:=strtofloat(Edit2.Text); Fr:=strtofloat(Edit3.Text); Y:=strtofloat(Edit4.Text); Fa:=strtofloat(Edit5.Text); K6:=strtofloat(Edit6.Text); Kt:=strtofloat(Edit7.Text); P:=(X*V*Fr+Y*Fa)*K6*Kt; Edit8:= FloatToStr(P);  end; end. ---------------------------------------------------------------------- marcov · 2023-05-19 21:38 Somehow the declaration of Button1click is not in the interface. The error might be a side effect of that. ---------------------------------------------------------------------- KodeZwerg · 2023-05-19 21:49 Quote from: Moon on May 19, 2023, 11:29:57 pmuses    var X,Y,Fa, Fr,K6,Kt,C,L,V, p:real; cant be good. ---------------------------------------------------------------------- Curt Carpenter · 2023-05-19 22:22 Did you identify an OnClick event for Button1 in the object inspector when you created your form?  That should have inserted a line "procedure:  Button1Click(Sender:TObject);" in your TForm declaration as noted by marcov above. ---------------------------------------------------------------------- cdbc · 2023-05-20 06:12 Hi Hmmm... Maybe a little...:Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i unit Unit1;{$mode objfpc}{$H+}interfaceuses  Classes, SysUtils, Forms, Controls, Graphics, Dialogs, StdCtrls, math; type  { TForm1 }  TForm1 = class(TForm)    Button1: TButton;    Edit1: TEdit;    Edit2: TEdit;    Edit3: TEdit;    Edit4: TEdit;    Edit5: TEdit;    Edit6: TEdit;    Edit7: TEdit;    Edit8: TEdit;    procedure Button1Click(Sender:TObject); { <- add this for starters }  private   public   end; var Form1: TForm1; implementationvar  { <- notice "uses" has gone }  X,Y,Fa, Fr,K6,Kt,C,L,V, p:real; procedure TForm1.Button1Click(Sender:TObject);begin  X:= strtofloat(Edit1.Text);  V:= strtofloat(Edit2.Text);  Fr:= strtofloat(Edit3.Text);  Y:= strtofloat(Edit4.Text);  Fa:= strtofloat(Edit5.Text);  K6:= strtofloat(Edit6.Text);  Kt:= strtofloat(Edit7.Text);   P:= (X*V*Fr+Y*Fa)*K6*Kt;  Edit8:= FloatToStr(P);end;end. One addition in the interface part, per @marcov's keen eye and one "uses" has vanished as observed by @KodeZwerg  You put your code in code-tags by hitting the #-button and fill-in between the two tags. It makes it a lot easier to read the code for all and doesn't interfere with the forum-software  Hth Regards Benny