You've already forked lazarus-ccr
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@7883 8e941d3f-bd1b-0410-a28a-d453659cc2b4
61 lines
1.0 KiB
ObjectPascal
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.
|
|
|