Difference between revisions of "Noop"
From Scriptwiki
m (added note about .echo -q) |
(None-minor edit.) |
||
(2 intermediate revisions by 2 users not shown) | |||
Line 6: | Line 6: | ||
It is a handy command when you need to evaluate some identifier without using the actual result. For example, you may want to evaluate a [[$regex]] identifier without using the information how many results it returns, just to later use the back-references it creates. Another example is [[$findfile]] which has a command option in itself, and therefore doesn't need any outside commands to handle its results. | It is a handy command when you need to evaluate some identifier without using the actual result. For example, you may want to evaluate a [[$regex]] identifier without using the information how many results it returns, just to later use the back-references it creates. Another example is [[$findfile]] which has a command option in itself, and therefore doesn't need any outside commands to handle its results. | ||
+ | |||
+ | == Examples == | ||
For example: | For example: | ||
noop $regex(I have 6 brothers,/I have (\d+) brothers/) | [[echo|echo -ag]] The number of brothers is [[$regml|$regml(1)]] | noop $regex(I have 6 brothers,/I have (\d+) brothers/) | [[echo|echo -ag]] The number of brothers is [[$regml|$regml(1)]] | ||
− | '''Note:''' This command came in mirc 6.17, for older versions [[echo|.echo -qg]] would be the same thing (the dot to make it silent and -q not to show it, if it was silent). | + | '''Note:''' This command came in mirc 6.17, for older versions [[echo|.echo -qg]] would be the same thing (the dot to make it silent and -q not to show it, if it was silent), or you could even use .[[xyzzy]] |
+ | |||
[[Category:Commands]] | [[Category:Commands]] |
Latest revision as of 00:55, 22 June 2013
Noop is a command that does literally nothing and doesn't care about any parameters.
/noop
What is it good for, then?
It is a handy command when you need to evaluate some identifier without using the actual result. For example, you may want to evaluate a $regex identifier without using the information how many results it returns, just to later use the back-references it creates. Another example is $findfile which has a command option in itself, and therefore doesn't need any outside commands to handle its results.
Examples
For example:
noop $regex(I have 6 brothers,/I have (\d+) brothers/) | echo -ag The number of brothers is $regml(1)
Note: This command came in mirc 6.17, for older versions .echo -qg would be the same thing (the dot to make it silent and -q not to show it, if it was silent), or you could even use .xyzzy