Revision: 12826
http://jvcl.svn.sourceforge.net/jvcl/?rev=12826&view=rev
Author: ahuser
Date: 2010-08-19 12:11:54 +0000 (Thu, 19 Aug 2010)
Log Message:
-----------
Instead of switching the global DecimalSeparator JvInterpreter now uses the TFormatSettings record.
Modified Paths:
--------------
trunk/jvcl/run/JvInterpreter.pas
Modified: trunk/jvcl/run/JvInterpreter.pas
===================================================================
--- trunk/jvcl/run/JvInterpreter.pas 2010-08-17 13:22:07 UTC (rev 12825)
+++ trunk/jvcl/run/JvInterpreter.pas 2010-08-19 12:11:54 UTC (rev 12826)
@@ -5045,7 +5045,7 @@
procedure TJvInterpreterExpression.ParseToken;
var
- OldDecimalSeparator: Char;
+ FS: TFormatSettings;
Dob: Extended;
Int: Integer;
Stub: Integer;
@@ -5060,15 +5060,10 @@
end;
ttDouble:
begin
- OldDecimalSeparator := DecimalSeparator;
- DecimalSeparator := '.';
- if not TextToFloat(PChar(FTokenStr), Dob, fvExtended) then
- begin
- DecimalSeparator := OldDecimalSeparator;
+ FS.ThousandSeparator := ',';
+ FS.DecimalSeparator := '.';
+ if not TextToFloat(PChar(FTokenStr), Dob, fvExtended, FS) then
JvInterpreterError(ieInternal, -1);
- end
- else
- DecimalSeparator := OldDecimalSeparator;
FToken := Dob;
end;
ttString:
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|