Files
lazarus-ccr/applications/lazstats/source_orig/probsmallerzunit.pas
wp_xxyyzz e1c5977e0d LazStats: Adding original source, part 6.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@7885 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2020-11-16 11:16:49 +00:00

61 lines
1.1 KiB
ObjectPascal

unit ProbSmallerzUnit;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, FileUtil, LResources, Forms, Controls, Graphics, Dialogs,
StdCtrls, functionslib;
type
{ TProbSmallerzForm }
TProbSmallerzForm = class(TForm)
CancelBtn: TButton;
ComputeBtn: TButton;
Label1: TLabel;
Label2: TLabel;
ProbzEdit: TEdit;
ResetBtn: TButton;
ReturnBtn: TButton;
zEdit: TEdit;
procedure ComputeBtnClick(Sender: TObject);
procedure ResetBtnClick(Sender: TObject);
private
{ private declarations }
public
{ public declarations }
end;
var
ProbSmallerzForm: TProbSmallerzForm;
implementation
{ TProbSmallerzForm }
procedure TProbSmallerzForm.ResetBtnClick(Sender: TObject);
begin
zEdit.Text := '';
ProbzEdit.Text := '';
end;
procedure TProbSmallerzForm.ComputeBtnClick(Sender: TObject);
VAR
zprob, z : double;
outvalue : string;
begin
z := StrToFloat(zEdit.Text);
zprob := probz(z);
outvalue := format('%6.4f',[zprob]);
ProbzEdit.Text := outvalue;
end;
initialization
{$I probsmallerzunit.lrs}
end.