mIRC Home    About    Download    Register    News    Help

Print Thread
#260193 10/03/17 04:02 PM
Joined: Jul 2006
Posts: 4,150
W
Wims Offline OP
Hoopy frood
OP Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,150
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"


#mircscripting @ irc.swiftirc.net == the best mIRC help channel
Joined: Dec 2002
Posts: 5,424
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 5,424
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.


Link Copied to Clipboard