In theory, neither...Time travels at the same speed
what kind of question is that? why would you use $+() unnecessarily?
He could be using it like this:
$+(.timer,.,%command) ....
But then, I'd guess it'd be to make his code harder to read (since he doesn't use a variable in his example). Which there aren't many reasons to do, since I've learned from a few snippets on how to do stuff before, and I'm sure many others have aswell.
well yeah his second example is only valid if .timer.command is all plaintext with no identifiers/variables. if theres something of that nature then clearly you don't have a ".timer.%command" alternative :F
Any speed difference is negligible. It's pointless to do the $+() example if you don't need to. If you want to connect a variable or an identifier like $nick to it, then you only have the one choice.
You can always check speed differences by using //echo -a $ticks and looping through what you are testing many times, then repeat with the other option. It will give you an idea of which is faster.
I agree that the speed difference is going to be negligible, but there should be a difference, since mIRC would have to evaluate the information provided in $+(.timer.command) before proceeding with the actual execution of the timer sequence, versus the 2nd version where .command is being used as a name, and mIRC doesn't need to evaluate this.
I think (although I haven't tested this) that the evaluation required in the first timer code would be done each time the timer runs, rather than just once, as would be the case with just the name.
i'm just curious which one is faster..
simple but still can't answer directly
your question doesn't deserve a direct answer
did you not read the above replies? you either need $+() or you don't. if you don't need it.. don't use it! it's as simple as that ;S stop worrying about speed for such meaningless bits of code and start focusing on what is suitable
It's not about what is better to use, what he should worry about, or what he can or can not ask. He is asking what is faster, and the only one that gave a decent reply to his question is Riamus.
You can always check speed differences by using //echo -a $ticks and looping through what you are testing many times, then repeat with the other option. It will give you an idea of which is faster.
.timer.command doesn't have to evaluated, so it will be faster than $+(.timer,.,command) or .timer $+ . $+ command
There is absolutely no point whatsoever in using a concatenation operation here though.
It's not about what is better to use, what he should worry about, or what he can or can not ask. He is asking what is faster, and the only one that gave a decent reply to his question is Riamus.
RusselB also gave an answer that would help. Though he didn't specifically say that $+() would take a little more time, I think it's easy to see that that is what he was meaning.
It's not about what is better to use, what he should worry about, or what he can or can not ask. He is asking what is faster, and the only one that gave a decent reply to his question is Riamus.
i feel that telling him which is faster without any more explanation would encourage him to ask more questions like this and intensify this poor way of thinking. speed could well be considered an important factor in certain circumstances, but certainly not here and i think he should first learn where it should be considered before worrying about it ;|
In theory, neither...Time travels at the same speed
Er, no it doesn't. Read up on some current Sciencific advancements or atleast Quantum and Special Relativity Theory. You seem to be stuck on Newton's Laws of motion (and it's absolute time).
Btw, Please stay with the topic and add some real help. By going around just posting, trying to be funny or smart is the quickest way to make people not like you or give you a mental whipping
lol Trixar is right, but in this application time does move at the same speed.
Concerning the initial question, yes, the difference is neglible when looking at one line of code, but my main concern is really efficiency. If there is no point in making mIRC perform commands for identifiers then why do it? One line is fine, but if a person adopts this method then there are way more than one line doing this and they add up quick.
My philosophy is make mIRC work as little as possible in every tiny bit of code you write because it all adds up.
$+ is used to combine an identifer with something, if it's not an identifier then you can just hardcode it.