|
Joined: Dec 2002
Posts: 19
Pikka bird
|
OP
Pikka bird
Joined: Dec 2002
Posts: 19 |
//echo > $count(hello there,$chr(32))
someone has probably already reported this, but to be on the safe side..
if there are more than one space in a text, it still only counts 1...
|
|
|
|
Joined: Jan 2003
Posts: 3,012
Hoopy frood
|
Hoopy frood
Joined: Jan 2003
Posts: 3,012 |
All cases of spaces, except if it is the terminating character (last character) are counter... Could you show an instance where this is proven otherwise?
-KingTomato
|
|
|
|
Joined: Dec 2002
Posts: 2,809
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 2,809 |
I think he means like "test test2" but I haven't tested...
|
|
|
|
Joined: Jan 2003
Posts: 3,012
Hoopy frood
|
Hoopy frood
Joined: Jan 2003
Posts: 3,012 |
To which you're referring "text<space><space>moretext" ? Just attepted it..
I first type: /set %test text<space><space>text then i typed /echo > $count(%test, $chr(32)) output: > 2
-KingTomato
|
|
|
|
Joined: Dec 2002
Posts: 19
Pikka bird
|
OP
Pikka bird
Joined: Dec 2002
Posts: 19 |
hmm, it was like i thought.. html couldnt handle more than one space.. well..
$count(<space><space><space>,$chr(32)) SHOULD return 3, but only returns 1..
though in the other hand $count(aaa,a) returns 3..
thats what i ment.. sorry if i was unclear..
|
|
|
|
Joined: Jan 2003
Posts: 3,012
Hoopy frood
|
Hoopy frood
Joined: Jan 2003
Posts: 3,012 |
Well actually, consider mirc just like html. Any additional "whitespace" is just voiced. I mean its like having the decimal 0.10000000 or 0.1 Both mean exactly the same, so why keep the extended spaces.. Thats alteast the outlook of it anyways.
-KingTomato
|
|
|
|
Joined: Dec 2002
Posts: 1,527
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 1,527 |
also echo $count($chr(44)$chr(32)$chr(32),$chr(32)) returns 0 basically it only defines a space if it is presant in the begining and only defines it as being one no matter how many u have there eg echo $count($chr(44)$chr(32)$chr(32)$chr(44),$chr(32)) returns 0 eg echo $count($chr(44)$chr(32)$chr(32)$chr(44),$chr(44)) returns only 1 actually this brings a whole new thing to show that the entire $count itself does infact have a major flaw in it
D3m0nnet.com
|
|
|
|
Joined: Dec 2002
Posts: 2,809
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 2,809 |
Actually it doesn't, you do :P You forgot $+
//echo -a $chr(44)$chr(32)$chr(32)$chr(44)
prints , therefore $count was correct.
$count($chr(44) $+ $chr(32) $+ $chr(32) $+ $chr(44),$chr(32))
That will correctly return 2
|
|
|
|
Joined: Dec 2002
Posts: 1,527
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 1,527 |
again i stand corrected ty ..... overlooked that lil thing
D3m0nnet.com
|
|
|
|
Joined: Dec 2002
Posts: 580
Fjord artisan
|
Fjord artisan
Joined: Dec 2002
Posts: 580 |
What else besides $count can handle double spaces? I didn't even think this was possible, so much mirc code simply can't deal with a double space....
|
|
|
|
Joined: Jan 2003
Posts: 2,523
Hoopy frood
|
Hoopy frood
Joined: Jan 2003
Posts: 2,523 |
Actually only /commands cannot handle double spaces. All identifiers (built-in or custom) and variables can. Of course the spaces shouldn't be typed literally in the code, you need to use $chr(32) or something like $remove(a a a,a) etc.
/.timerQ 1 0 echo /.timerQ 1 0 $timer(Q).com
|
|
|
|
Joined: Dec 2002
Posts: 29
Ameglian cow
|
Ameglian cow
Joined: Dec 2002
Posts: 29 |
|
|
|
|
|