Posted By: maroon
numbers beginning with period - 27/10/19 09:15 AM
beta doesn't think fractions without a leading integer are numeric. 7.57 nobeta did
//if (.25 !> 0) echo -a bug1 $v1 !> $v2 | if (.25 !isnum 0-1) echo -a bug2 $v1 !isnum $v2
Posted By: Protopia
Re: numbers beginning with period - 27/10/19 09:36 AM
@maroon - I have no idea how you spot these things.
But it does get me thinking about whether the community should try to develop (on Github perhaps) a test script full of these sorts of tests which verify the continuing correct operation of mIRC (and ideally which has the necessary version tests that allow it to be run to verify how previous versions of mIRC run).
Posted By: maroon
Re: numbers beginning with period - 27/10/19 09:55 AM
I noticed it because a script didn't behave as expected. I checked the past several betas too, as far back as I could go in the 30 days period, and it happened there too and I hadn't noticed.
The beta older than 30 days just silently did nothing.
Posted By: Khaled
Re: numbers beginning with period - 27/10/19 12:14 PM
Thanks for spotting this. A few betas ago, I had to make changes to the routines that determine if a parameter is a number. There are were several different routines that did this, in slightly different ways and called from different features, each added over many years. These were all replaced by a single optimized routine for consistency. There were also a number of features that did not handle floating point values when they should have and others that allowed floating point values when they shouldn't have. All of these were changed to handle the correct number type. The above issue will be fixed in the next beta so that it matches the old behaviour.