LazStats: More refactoring of WLSUnit.

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@7776 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
wp_xxyyzz
2020-10-12 21:53:18 +00:00
parent 27d63f9c58
commit 9013e01332
4 changed files with 237 additions and 150 deletions

View File

@ -25,6 +25,8 @@ function IsFiltered(AGrid: TStringGrid; ARow: integer): boolean;
function IsMissingValueCode(AGrid: TStringGrid; ARow, ACol: Integer): Boolean;
function IsNumericCol(AColIndex: Integer): Boolean;
function ValidValue(AGrid: TStringGrid; ARow, ACol: integer): boolean;
@ -155,6 +157,17 @@ begin
end;
{ Checks in the dictionary whether the variable in the specified grid column has
either data type float or integer. }
function IsNumericCol(AColIndex: Integer): Boolean;
var
typeCode: String;
begin
typeCode := Trim(DictionaryFrm.DictGrid.Cells[4, AColIndex]);
Result := (typeCode = 'F') or (typeCode = 'I');
end;
{ Checks wheter the value in cell at the given column and row is a not-filtered,
non-empty number.
NOTE: non-numeric characters in a numeric field are not taken into account! }