mIRC Home    About    Download    Register    News    Help

Print Thread
#76290 24/03/04 12:31 AM
K
Kneet
Kneet
K
I don't know if this either a bug or a planned thing, but I do question the necessity for it. Anyway:
$gettok(...,0,46) will return 0, although i think it should return 4, because there are 4 $chr(46) delimeters in the string.

The same error occurs when using the following:
$gettok(1.2..4,3,46) will return 4 in stead of nothing.

So it seems that if a token is empty, it gets discarded, although according to the delimiter characters, the token should exist and contain an empty string.

Bug or what?

#76291 24/03/04 01:05 AM
Joined: Dec 2002
Posts: 2,884
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 2,884
I don't think it's a bug, it's simply a limitation (intentional or otherwise) of the parser. The lack of null tokens with $gettok() is presumably linked with the lack of null tokens when using /tokenize or the 'stripped spaces' effect of all text in mIRC. Personally I'd like to see null tokens allowed, but I'd imagine it would break a whole lot of old scripts so I don't know whether other people would feel the same way.

#76292 24/03/04 03:21 AM
Joined: Dec 2002
Posts: 1,893
O
Hoopy frood
Offline
Hoopy frood
O
Joined: Dec 2002
Posts: 1,893


Link Copied to Clipboard