Please Help - Delphi Procedure

Hello,

I have created my own method which receives values from 2 spin edits but for some reason program is not compiling, when I am unable to call my procedure form the button. Please see code below:

procedure btnLossClick(Sender: TObject);
private
procedure GramsOff(HourRun, HourCycle : Integer; var GramOff : String);
public
{ Public declarations }
end;

var
frmFee: TfrmFee;

implementation

{$R *.dfm}

procedure TfrmFee.GramsOff(HourRun, HourCycle : Integer; var GramOff : String);
Var
TotalCal, GramsLost : Integer;
Begin
HourRun := (sedRun.Value * 475);
HourCycle := (sedCycle.Value * 200);
TotalCal := (HourRun + HourCycle);
GramsLost := (TotalCal * 10 DIV 77);
GramOff := 'Weight loss: ' + IntToStr(GramsLost) + ' grams';
end; //proc GramsOff

procedure TfrmFee.btnLossClick(Sender: TObject);
var
HourRun, HourCycle : integer;
GramsOff : string; //Declare a local varicable FeeStr
begin
GramsOff (HourRun, HourCycle,GramOff ); {Error: [dcc32 Error] Ass13.pas(50): E2066 Missing operator or semicolon}
lblResults.Caption := GramOff;

end;
end.
This is a C++ forum.
Topic archived. No new replies allowed.