mIRC Home    About    Download    Register    News    Help

Print Thread
numbers beginning with period #266246 27/10/19 09:15 AM
Joined: Jan 2004
Posts: 1,230
maroon Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Jan 2004
Posts: 1,230
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

Re: numbers beginning with period [Re: maroon] #266247 27/10/19 09:36 AM
Joined: Aug 2003
Posts: 246
P
Protopia Offline
Fjord artisan
Offline
Fjord artisan
P
Joined: Aug 2003
Posts: 246
@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).

Re: numbers beginning with period [Re: Protopia] #266248 27/10/19 09:55 AM
Joined: Jan 2004
Posts: 1,230
maroon Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Jan 2004
Posts: 1,230
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.

Re: numbers beginning with period [Re: maroon] #266249 27/10/19 12:14 PM
Joined: Dec 2002
Posts: 4,589
Khaled Offline
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 4,589
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.