unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
type
TForm1 = class(TForm)
Button1: TButton;
procedure Button1Click(Sender: TObject);
private
public
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
function SumNum(x1, x2 : Double) : Double; Inline;
begin
Result := x1 + x2;
end;
procedure TForm1.Button1Click(Sender: TObject);
var
x1, x2 : Double;
begin
Randomize;
x1 := Random(100) + Random;
x2 := Random(100) + Random;
ShowMessage(FormatFloat('#,###,###.00',SumNum(x1,x2)));
end;
end.