From 2d32856cbc66fa0660b19adc67ecbfb527f7ed7a Mon Sep 17 00:00:00 2001 From: wp_xxyyzz Date: Sun, 23 Aug 2020 14:31:27 +0000 Subject: [PATCH] LazStats: Less hints and warnings. git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@7631 8e941d3f-bd1b-0410-a28a-d453659cc2b4 --- .../source/forms/analysis/comparisons/twocorrsunit.pas | 6 +++--- .../source/forms/analysis/descriptive/plotxyunit.pas | 7 ++++--- .../source/forms/analysis/multiple_regression/lsmrunit.pas | 2 +- .../forms/analysis/multivariate/correspondenceunit.pas | 2 +- .../source/forms/analysis/nonparametric/sensunit.pas | 2 +- applications/lazstats/source/forms/mainunit.pas | 2 ++ 6 files changed, 12 insertions(+), 9 deletions(-) diff --git a/applications/lazstats/source/forms/analysis/comparisons/twocorrsunit.pas b/applications/lazstats/source/forms/analysis/comparisons/twocorrsunit.pas index be2e4461c..b15d4bc32 100644 --- a/applications/lazstats/source/forms/analysis/comparisons/twocorrsunit.pas +++ b/applications/lazstats/source/forms/analysis/comparisons/twocorrsunit.pas @@ -198,6 +198,7 @@ end; procedure TTwoCorrsFrm.ComputeBtnClick(Sender: TObject); var + lReport: TStrings; Corxy, Corxz, Coryz, Cor1, Cor2, alpha, tvalue, df1, df2: double; CorDif, zOne, zTwo, zDif, StdErr, zValue, zprobability: double; UCL, LCL, ztest, ConfLevel, tprobability, ttest: double; @@ -208,10 +209,9 @@ var SSize1, SSize2, SSize, v1, v2, v3, grp, ncases, NoSelected: integer; min, max, grpval, ncases1, ncases2, i: integer; cellstring: string; - ColNoSelected: IntDyneVec; msg: String; C: TWinControl; - lReport: TStrings; + ColNoSelected: IntDyneVec = nil; begin if not Validate(msg, C) then begin @@ -221,7 +221,7 @@ begin exit; end; - SetLength(ColNoSelected,NoVariables); + SetLength(ColNoSelected, NoVariables); Corxy := 0.0; Corxz := 0.0; Coryz := 0.0; diff --git a/applications/lazstats/source/forms/analysis/descriptive/plotxyunit.pas b/applications/lazstats/source/forms/analysis/descriptive/plotxyunit.pas index f1da4e514..f24cb0a8b 100644 --- a/applications/lazstats/source/forms/analysis/descriptive/plotxyunit.pas +++ b/applications/lazstats/source/forms/analysis/descriptive/plotxyunit.pas @@ -353,9 +353,9 @@ var xmin, xmax, ymin, ymax: Double; begin if ChartForm = nil then - ChartForm := TChartForm.Create(Application); - - ChartForm.Clear; + ChartForm := TChartForm.Create(Application) + else + ChartForm.Clear; // Titles ChartForm.SetTitle('X vs. Y plot using file ' + OS3MainFrm.FileNameEdit.Text); @@ -376,6 +376,7 @@ begin if ConfChk.Checked then ChartForm.PlotXY(ptLines, XPoints, LowConf, 'Lower confidence band', clRed); + ChartForm.Chart.Prepare; ChartForm.GetXRange(xmin, xmax, false); ChartForm.GetYRange(ymin, ymax, false); diff --git a/applications/lazstats/source/forms/analysis/multiple_regression/lsmrunit.pas b/applications/lazstats/source/forms/analysis/multiple_regression/lsmrunit.pas index 33c9f5301..ee59f9d7b 100644 --- a/applications/lazstats/source/forms/analysis/multiple_regression/lsmrunit.pas +++ b/applications/lazstats/source/forms/analysis/multiple_regression/lsmrunit.pas @@ -51,7 +51,7 @@ type procedure InBtnClick(Sender: TObject); procedure OutBtnClick(Sender: TObject); procedure ResetBtnClick(Sender: TObject); - procedure VarListSelectionChange(Sender: TObject; User: boolean); + procedure VarListSelectionChange(Sender: TObject; {%H-}User: boolean); private { private declarations } FAutoSized: boolean; diff --git a/applications/lazstats/source/forms/analysis/multivariate/correspondenceunit.pas b/applications/lazstats/source/forms/analysis/multivariate/correspondenceunit.pas index d4864d3e4..f72e0d636 100644 --- a/applications/lazstats/source/forms/analysis/multivariate/correspondenceunit.pas +++ b/applications/lazstats/source/forms/analysis/multivariate/correspondenceunit.pas @@ -216,7 +216,7 @@ begin SetLength(Freq,Nrows+1,Ncols+1); SetLength(Prop,Nrows+1,Ncols+1); SetLength(Expected,Nrows,Ncols); - SetLength(CellChi,Nrows,Ncols); + SetLength(CellChi, Nrows, Ncols); for i := 1 to Nrows + 1 do for j := 1 to Ncols + 1 do Freq[i-1,j-1] := 0; RowLabels[Nrows] := 'Total'; diff --git a/applications/lazstats/source/forms/analysis/nonparametric/sensunit.pas b/applications/lazstats/source/forms/analysis/nonparametric/sensunit.pas index 2558725a2..a6d8239f5 100644 --- a/applications/lazstats/source/forms/analysis/nonparametric/sensunit.pas +++ b/applications/lazstats/source/forms/analysis/nonparametric/sensunit.pas @@ -50,7 +50,7 @@ type procedure InBtnClick(Sender: TObject); procedure OutBtnClick(Sender: TObject); procedure ResetBtnClick(Sender: TObject); - procedure VarListSelectionChange(Sender: TObject; User: boolean); + procedure VarListSelectionChange(Sender: TObject; {%H-}User: boolean); private { private declarations } FAutoSized: Boolean; diff --git a/applications/lazstats/source/forms/mainunit.pas b/applications/lazstats/source/forms/mainunit.pas index 969d4d850..8836b968a 100644 --- a/applications/lazstats/source/forms/mainunit.pas +++ b/applications/lazstats/source/forms/mainunit.pas @@ -524,7 +524,9 @@ end; procedure TOS3MainFrm.FormCreate(Sender: TObject); var helpfn: String; + {$IFNDEF USE_EXTERNAL_HELP_VIEWER} lhelpfn: String; + {$ENDIF} begin // Reduce ultra-wide width of Inputbox windows cInputQueryEditSizePercents := 0;