Search code examples
delphidelphi-7

StrToFloat raise error in my Application not in any application


My application written month ago in Delphi 7. Now I want to convert a float str value (like 12.5) to extended, but delphi raise an error.

Debugger Exception Notification

Project Educatee.exe raised exception class EConvertError with message ''12.5' is not a valid floating point value'. Process stopped. Use Step or Run to continue.

Same function work correctly in New Application

Code is simply var x: Extended; and any where X:= strToFloat('12.5');


Solution

  • Check the value of DecimalSeparator variable located in sysUtils anywhere of your codes that is set to another character. I found it and that was set to '/' character.