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

(Created page with "{{mirc title|$ifmatch2 Identifier}}{{Deprecated feature|new={{mIRC|$v2}}}}'''$ifmatch2''' return the second part of the last conditional statement made. == Synopsis == <pre>$...")
 
m
 
(3 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 
{{mirc title|$ifmatch2 Identifier}}{{Deprecated feature|new={{mIRC|$v2}}}}'''$ifmatch2''' return the second part of the last conditional statement made.
 
{{mirc title|$ifmatch2 Identifier}}{{Deprecated feature|new={{mIRC|$v2}}}}'''$ifmatch2''' return the second part of the last conditional statement made.
 +
  
 
== Synopsis ==
 
== Synopsis ==
Line 11: Line 12:
  
 
None
 
None
 +
 +
== Notes ==
 +
 +
Just like $v1 $v2 and $ifmatch, this identifier return the value from the very last statement made:
 +
<source lang="mIRC">
 +
alias test return $iif($1 == 1,1,2)
 +
alis testing if (a != b) echo -a $test(1) $ifmatch2
 +
</source>
 +
This will echo 1 as $ifmatch2 because $test is evaluated before $ifmatch2, so the $iif is the last statement made when $ifmatch2 evaluates.
  
 
== Example ==
 
== Example ==
Line 18: Line 28:
 
{{mIRC compatibility|5.4}}
 
{{mIRC compatibility|5.4}}
  
== See Also ==
+
== See also ==
 
{{mIRC|$ifmatch}}
 
{{mIRC|$ifmatch}}
 
{{mIRC|$v1}}
 
{{mIRC|$v1}}
Line 24: Line 34:
 
{{mIRC|/if}}
 
{{mIRC|/if}}
 
{{mIRC|/while}}
 
{{mIRC|/while}}
[[Category:MIRC identifiers]]
+
[[Category:mIRC identifiers|ifmatch2]]

Latest revision as of 16:12, 20 September 2017

Note: This feature has essentially been replaced by $v2.$ifmatch2 return the second part of the last conditional statement made.


Synopsis[edit]

$ifmatch2

Paramters[edit]

None

Properties[edit]

None

Notes[edit]

Just like $v1 $v2 and $ifmatch, this identifier return the value from the very last statement made:

alias test return $iif($1 == 1,1,2)
alis testing if (a != b) echo -a $test(1) $ifmatch2

This will echo 1 as $ifmatch2 because $test is evaluated before $ifmatch2, so the $iif is the last statement made when $ifmatch2 evaluates.

Example[edit]

//if (a != b) echo -a $ifmatch2

Compatibility[edit]

Added: mIRC v5.4
Added on: 23 Jun 1998
Note: Unless otherwise stated, this was the date of original functionality.
Further enhancements may have been made in later versions.


See also[edit]

$ifmatch $v1 $v2 /if /while