Closed tigrazone closed 6 years ago
@tigrazone can you tell me what version of Lazarus you are using? I am unable to replicate your issue with Lazarus 1.8.2 on Windows or Lazarus SVN 1.9 on MacOS. strtofloat is a core Lazarus function, so if it is a problem we should get it fixed at the source. Also, can you attach an ini file that generates this error, just in case the issue is there. If you are using a version of Lazarus prior to 1.8.2 can you try upgrading to this latest stable version. I think this will fix your issue and the new version has a lot of other nice benefits.
@tigrazone - one other question. What is your decimal separator. Do you write "0.35" or "0,35"? The manunit.pas does specify DefaultFormatSettings.DecimalSeparator := '.';
, but it might be nice to rule out this possibility.
I use last lazarus on Windows 7. ini file created by surf-ice. somethimes open ok, sometimes with error. val procedure is older but dont give issues
Can you please test the current code. The issue is that your system is set to use ',' as the decimal separator, while mine uses '.'.
I prefer to use floattostr as it generates a dialog if there is an error. This informs the user of the issue and we can fix it. In your implementation, any invalid value is converted to a zero without the user knowing there has been a problem. In this case, where the color bar should be 3.5% of the screen space, your solution would make the colorer require 0%: it would be invisible and the user would not know why.
Thanks for alerting me to this problem.
it helps! your approach fix issue
when read ini file I have a bug
and then
and program start to work like broken - no model, menu is broken