|
@@ -1213,7 +1213,18 @@ Begin
|
|
P:=Pos(FormatSettings.DecimalSeparator,S);
|
|
P:=Pos(FormatSettings.DecimalSeparator,S);
|
|
If (P<>0) Then
|
|
If (P<>0) Then
|
|
S[P] := '.';
|
|
S[P] := '.';
|
|
- Val(trim(S),Value,E);
|
|
|
|
|
|
+ try
|
|
|
|
+ Val(trim(S),Value,E);
|
|
|
|
+ { on x87, a floating point exception may be pending in case of an invalid
|
|
|
|
+ input value -> trigger it now }
|
|
|
|
+{$if defined(cpui386) or (defined(cpux86_64) and not(defined(win64))) or defined(cpui8086)}
|
|
|
|
+ asm
|
|
|
|
+ fwait
|
|
|
|
+ end;
|
|
|
|
+{$endif}
|
|
|
|
+ except
|
|
|
|
+ E:=1;
|
|
|
|
+ end;
|
|
Result:=(E=0);
|
|
Result:=(E=0);
|
|
End;
|
|
End;
|
|
|
|
|
|
@@ -1273,7 +1284,7 @@ Begin
|
|
end;
|
|
end;
|
|
{ on x87, a floating point exception may be pending in case of an invalid
|
|
{ on x87, a floating point exception may be pending in case of an invalid
|
|
input value -> trigger it now }
|
|
input value -> trigger it now }
|
|
-{$ifdef cpux86}
|
|
|
|
|
|
+{$if defined(cpui386) or (defined(cpux86_64) and not(defined(win64))) or defined(cpui8086)}
|
|
asm
|
|
asm
|
|
fwait
|
|
fwait
|
|
end;
|
|
end;
|