View Issue Details

IDProjectCategoryView StatusLast Update
0006748JEDI VCL00 JVCL Componentspublic2022-07-28 13:29
ReporteracgubamgAssigned To 
Status newResolutionopen 
PlatformAlexandria 11.1OSWindowsOS Version10
Product VersionDaily / GIT 
Target VersionFixed in Version 
Summary0006748: JvBaseEdits, IsValidFloat
Descriptiona failure occurs in TJVDBCalcEdit, when trying to type a value starting as cents, without typing the number zero before the comma.
Example: 0,15, ok, accept nice. But if you type: ,15, it doesn't work.

The error occurs in the JvBaseEdits unit, IsValidFloat function, after activating the TextToFloat function.

function IsValidFloat(const Value: string; var RetValue: Extended): Boolean;
   I: Integer;
   Result := False;
   for I := 1 to Length(Value) do
     if not CharInSet(Value[I], [JclFormatSettings.DecimalSeparator, '-', '+', '0'..'9', 'e', 'E']) then
   Result := TextToFloat(PChar(Value), RetValue, fvExtended);

In Delphi Alexandria 11, Result := TextToFloat(PChar(Value), RetValue, fvExtended); returns "True".

In Delphi Alexandria 11.1, Result := TextToFloat(PChar(Value), RetValue, fvExtended); returns "False".

The value of the variable "Value", is ","

The value entered was just the comma, without the zero before.
Steps To Reproduceinstall delphi alexandria 11.1
Install last jvcl and jcl
place a TJVDBCalcEdit in the form
now, clear TJVDBCalcEdit
now, type , or . 15 Ex: ,15
TagsNo tags attached.



2022-04-29 05:18

reporter (94,038 bytes)

Issue History

Date Modified Username Field Change
2022-04-29 05:18 acgubamg New Issue
2022-04-29 05:18 acgubamg File Added: