Delphi beginners

Moderators: netgert
Number of threads: 352
Number of posts: 975

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
Whats wrong with this? Posted by DustbinJumper on 16 Aug 2012 at 3:06 AM
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.



 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.