From WikiChip
$$ Identifier - mIRC
< mirc‎ | identifiers
Revision as of 00:39, 24 December 2019 by Maroonbells (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

$$ 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]