Files
lazarus-ccr/applications/lazstats/source_orig/fprobunit.pas
wp_xxyyzz 045c799d49 LazStats: Adding original source, part 3.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@7882 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2020-11-16 11:07:56 +00:00

69 lines
1.2 KiB
ObjectPascal

unit FProbUnit;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, FileUtil, LResources, Forms, Controls, Graphics, Dialogs,
StdCtrls, functionslib;
type
{ TFForm }
TFForm = class(TForm)
CancelBtn: TButton;
ComputeBtn: TButton;
DF1Edit: TEdit;
DF2Edit: TEdit;
ProbEdit: TEdit;
FEdit: TEdit;
Label1: TLabel;
Label2: TLabel;
Label3: TLabel;
Label4: TLabel;
ResetBtn: TButton;
ReturnBtn: TButton;
procedure ComputeBtnClick(Sender: TObject);
procedure ResetBtnClick(Sender: TObject);
private
{ private declarations }
public
{ public declarations }
end;
var
FForm: TFForm;
implementation
{ TFForm }
procedure TFForm.ResetBtnClick(Sender: TObject);
begin
FEdit.Text := '';
DF1Edit.Text := '';
DF2Edit.Text := '';
ProbEdit.Text := '';
end;
procedure TFForm.ComputeBtnClick(Sender: TObject);
VAR
F, df1, df2, prob : extended;
outvalue : string;
begin
F := StrToFloat(FEdit.Text);
df1 := StrToFloat(DF1Edit.Text);
df2 := StrToFloat(DF2Edit.Text);
prob := probf(F,df1,df2);
outvalue := format('%6.4f',[prob]);
ProbEdit.Text := outvalue;
end;
initialization
{$I fprobunit.lrs}
end.