View Issue Details

IDProjectCategoryView StatusLast Update
0006346JEDI Code LibraryJclExprEvalpublic2024-01-02 21:15
ReporterMistralAssigned To 
PrioritynormalSeverityblockReproducibilityalways
Status resolvedResolutionfixed 
Product VersionVersion 2.5 (Subversion repository/Daily zips) 
Target VersionFixed in Version 
Summary0006346: TEvaluator doesn't work anymore with floating point values with Italian decimal separator
DescriptionWith previous version, till last JCL commit (30th septembar) ,all works fine.

I'm working on an italian machine so my default DecimalSeparator is "," and not ".".

I'm not able to evaluate expression because I don't know how to pass decimal separator in strings:

if I use Evaluator.Evaluate('123,45*9') I get: "Parse error: Unknown symbol: 123"
if I use Evaluator.Evaluate('123.45*9') I get: "123.45 in not a valid floating point value"

The workaround to make it work is this:

...
OldSep:=FormatSettings.DecimalSeparator;
try
  FormatSettings.DecimalSeparator:='.';
  VCalc:=Evaluator.Evaluate('123.45*9');
finally
  FormatSettings.DecimalSeparator:=OldSep;
end;
TagsNo tags attached.
Fixed in GIT commit
Fixed in SVN revision
IDE versionAll

Activities

AHUser

2024-01-02 21:15

developer   ~0022069

Already fixed in git main branch. The dot (".") is the only decimal separator for expressions and the StrToFloat() call in the expression parser is forced to use the "."

Issue History

Date Modified Username Field Change
2014-10-30 12:00 Mistral New Issue
2014-10-30 12:00 Mistral IDE version => All
2024-01-02 21:15 AHUser Status new => resolved
2024-01-02 21:15 AHUser Resolution open => fixed
2024-01-02 21:15 AHUser Note Added: 0022069