mIRC Homepage
Posted By: Wims $instok and $null value - 10/03/17 04:02 PM
Code:
//echo -a > $instok(a,b,-1,) -- $instok(,b,-1,)


When omitting the 'ascii' number parameter, when the input text is different from $null, $instok returns $null, it doesn't if the input text is $null, which is surprising to me.

Not sure what should be the correct behavior and I know token $identifiers were changed 'recently' to fix some discrepancies so maybe this can't be fixed.
Ideally I'd like to be able to omit the C parameter in all case, mIRC uses 0 in this case, which is handy to stick character together (while you need the features/behaviors provided by $instok), so ideally $instok(a,b,-1,) should be "ab"
Posted By: Khaled Re: $instok and $null value - 10/03/17 06:05 PM
Thanks for your bug report. That is odd, however the behaviour has been in place for about 20 years, so... it cannot be changed without breaking scripts. The solution is to always specify the N and C parameters.
© mIRC Discussion Forums