Files
lazarus-ccr/applications/lazstats/source_orig/inversezunit.pas

61 lines
1.0 KiB
ObjectPascal
Raw Normal View History

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.