[fpc-devel] TryStrtoFloat - Bug?

Marcel Märtens marcel.cochem at googlemail.com
Tue Jul 3 17:46:58 CEST 2012


Hello,
i think i've found a bug in the procedure TryStrtoFloat.
To get this bug, create a new project and run this lines (i'm using a 
button to run the line, but it shouldn't matter)

---------------------------------------------------
var
   areal:real;
begin
TryStrtoFloat('86E6722INVALID!',areal);
end;
---------------------------------------------------



"86E6722" is a valid number, which is out of range and creates an error. 
The whole text is not a valid number, but it also creates an error.
It raises an "External: SIGFPE" error.

B.t.w.:  "TryStrToInt('86E6722INVALID!',aint);"  or 
"TryStrToInt('86E6722',aint);" raises no error, they just return false.

Thanks.
Marcel Märtens

----------------------------------------------------------------------------
Lazarus 1.1 r37649 FPC 2.6.1 i386-win32-win32/win64
Win 7 64bit  - FPC 32 bit



More information about the fpc-devel mailing list