SRL Archive - Bugs

Error: "(..)" is an invalid float at line (..)


Floor66

2015-10-08 15:19:42

Hello,

there's a very peculiar bug that rears its head occasionally in Simba for me.
It usually occurs after using Simba for quite a long time, perhaps putting my PC in sleep mode and waking up.

Normally, extendeds' decimal numbers are separated by a period (1.5 or 58.6, etc.), so when doing this:

WriteLn(FloatToStr(1.5));

There is zero issue… The debug window output is:
1.5

When this bug appears, this code will fail:

WriteLn(FloatToStr(StrToFloat('1.5')));

It will throw this error:
Error: "1.5" is an invalid float at line 4

But, when the code is changed to this:

WriteLn(FloatToStr(StrToFloat('1,5')));

It executes successfully.

It seems that a conflict arises in the decimal separator of Extended numbers… I'm sorry that I can't specify exactly how to trigger this…
Sometimes there's no problem at all for a few hours, and then all of the sudden Simba stops interpreting the period as decimal separator in StrToFloat, and decides it only wants to take commas!

OS: Windows 10 x64
Using latest available version of Simba

I hope I've been clear enough, if not, please don't hesitate to ask, because this really throws a wrench in the works sometimes and I'd love to see it resolved.

Cheers,

Floor66