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

(Properties)
(Notes)
Line 19: Line 19:
 
alis testing if (a != b) echo -a $test(1) $ifmatch2
 
alis testing if (a != b) echo -a $test(1) $ifmatch2
 
</source>
 
</source>
This will echo 1 as $ifmatch2 because $test is evaluated after the if statement, so the $iif is the last statement made when $ifmatch2 evaluates.
+
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 ==

Revision as of 21:33, 10 November 2015

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

Synopsis

$ifmatch2

Paramters

None

Properties

None

Notes

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

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

Compatibility

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

$ifmatch $v1 $v2 /if /while