From WikiChip
Difference between revisions of "mirc/identifiers/$$"
< mirc‎ | identifiers

m
 
(One intermediate revision by one other user not shown)
Line 2: Line 2:
  
 
'''Note''': $$ is not executing a /halt, it's effectively a way to halt completely the script execution, just like /halt, except that /halt also implies /haltdef, whereas $$ does not. This can be used inside events to /halt without /haltdef'ing. You can use the construct '$$null' for example.
 
'''Note''': $$ is not executing a /halt, it's effectively a way to halt completely the script execution, just like /halt, except that /halt also implies /haltdef, whereas $$ does not. This can be used inside events to /halt without /haltdef'ing. You can use the construct '$$null' for example.
 
 
 
== Synopsis ==
 
== Synopsis ==
 
<pre>$$identifier</pre>
 
<pre>$$identifier</pre>
  
 
== Examples ==
 
== Examples ==
<source lang="mIRC">alias testit {
+
Halts the echo unless the active window is a channel:
msg $$chan test
+
<source lang="mIRC">//echo -a $$chan test</source>
}</source>
 
  
 +
* Note: $$ without any following non-spaces touching it behaves as if an identifier returning the literal $$ string, however it does not recognize $$$ as if halting the $$ identifier. $$3 halts the script if $3 is null. Only the final command here is an error:
  
 +
<source lang="mIRC">//tokenize 32 parm1 parm2 parm3 | echo 3 -a $ $$ | echo 4 -a $$3 | echo 5 -a $$3a,b | echo 5 -a $$,b</source>
 
== Compatibility ==
 
== Compatibility ==
 
{{mIRC compatibility|2.8c}}
 
{{mIRC compatibility|2.8c}}
  
 
== See Also ==
 
== See Also ==
[[List of identifiers - mIRC|mIRC Identifiers]]
+
* {{mIRC|/halt}}
{{mIRC identifier list}}
+
* {{mIRC|/haltdef}}
 
 
[[Category:mIRC identifiers|$& identifier - mIRC]]
 

Latest revision as of 01:39, 24 December 2019

$$ is a construct which allows you to halt the script if the identifier returns $null. If used correctly it's a very short and simple way to halt a routine if a parameter is $null.

Note: $$ is not executing a /halt, it's effectively a way to halt completely the script execution, just like /halt, except that /halt also implies /haltdef, whereas $$ does not. This can be used inside events to /halt without /haltdef'ing. You can use the construct '$$null' for example.

Synopsis[edit]

$$identifier

Examples[edit]

Halts the echo unless the active window is a channel:

//echo -a $$chan test
  • Note: $$ without any following non-spaces touching it behaves as if an identifier returning the literal $$ string, however it does not recognize $$$ as if halting the $$ identifier. $$3 halts the script if $3 is null. Only the final command here is an error:
//tokenize 32 parm1 parm2 parm3 | echo 3 -a $ $$ | echo 4 -a $$3 | echo 5 -a $$3a,b | echo 5 -a $$,b

Compatibility[edit]

Added: mIRC v2.8c
Added on: 26 Mar 1995
Note: Unless otherwise stated, this was the date of original functionality.
Further enhancements may have been made in later versions.


See Also[edit]