Files
lazarus-ccr/applications/lazstats/source_orig/inversezunit.pas
wp_xxyyzz e234aa84ce LazStats: Adding original source, part 4.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@7883 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2020-11-16 11:10:28 +00:00

61 lines
1.0 KiB
ObjectPascal

unit InversezUnit;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, FileUtil, LResources, Forms, Controls, Graphics, Dialogs,
StdCtrls, functionslib;
type
{ TInversezForm }
TInversezForm = class(TForm)
CancelBtn: TButton;
ComputeBtn: TButton;
ResetBtn: TButton;
ReturnBtn: TButton;
ZEdit: TEdit;
Label2: TLabel;
ProbEdit: TEdit;
Label1: TLabel;
procedure ComputeBtnClick(Sender: TObject);
procedure ResetBtnClick(Sender: TObject);
private
{ private declarations }
public
{ public declarations }
end;
var
InversezForm: TInversezForm;
implementation
{ TInversezForm }
procedure TInversezForm.ResetBtnClick(Sender: TObject);
begin
ProbEdit.Text := '';
ZEdit.Text := '';
end;
procedure TInversezForm.ComputeBtnClick(Sender: TObject);
VAR
Prob, Zscore : double;
outvalue : string;
begin
Prob := StrToFloat(ProbEdit.Text);
Zscore := inversez(Prob);
outvalue := format('%6.4f',[Zscore]);
ZEdit.Text := outvalue;
end;
initialization
{$I inversezunit.lrs}
end.