Whats wrong with this? - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Whats wrong with this?

interface

uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, Buttons, Spin, ExtCtrls, Math;

type
TfrmFunctions = class(TForm)
lblHeading1: TLabel;
lblHeading2: TLabel;
pnl1: TPanel;
pnl2: TPanel;
pnlFunction: TPanel;
lblBase: TLabel;
lblExponent: TLabel;
lblPower: TLabel;
lblNumber: TLabel;
lblDecimals: TLabel;
lblRoundto: TLabel;
sedBase: TSpinEdit;
sedEx: TSpinEdit;
sedDecimals: TSpinEdit;
edtNumber: TEdit;
edtRoundto: TEdit;
edtPower: TEdit;
bmbReset: TBitBtn;
bmbClose: TBitBtn;
btnShow: TButton;
procedure btnShowClick(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;

var
frmFunctions: TfrmFunctions;

implementation

{$R *.dfm}

procedure TfrmFunctions.btnShowClick(Sender: TObject);
var
iBase, iExp, iDecimals : integer;
rNumber, rPower, rRoundto : real;
begin
iBase := sedBase.Value;
iExp := sedEx.Value;
rPower := Power(iBase, iExp);
edtPower.Text := FloatToStr(rPower)
rNumber := StrToFloat(edtNumber.Text);
iDecimals := sedDecimals.Value;
rRoundto := RoundTo(rNumber, iDecimals)
edtRoundto.Text := FloatToStr(rRoundto);
end;

end.


It doesn't want to compile.
Sign In or Register to comment.