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

m (See Also)
m (slight clarification)
Line 1: Line 1:
The '''$v1''' identifier returns the value of the lefthand operand of the most recently checked conditonal statement. This identifier is equivalent to the [[$ifmatch identifier - mIRC|$ifmatch]] identifier.
+
The '''$v1''' identifier returns the value of the lefthand operand of the most recently checked conditonal statement within a script. This identifier is equivalent to the [[$ifmatch identifier - mIRC|$ifmatch]] identifier.
  
 
==Synopsis==
 
==Synopsis==

Revision as of 22:23, 26 June 2014

The $v1 identifier returns the value of the lefthand operand of the most recently checked conditonal statement within a script. This identifier is equivalent to the $ifmatch identifier.

Synopsis

$v1

Examples

List the names of any hash tables currently in use upon calling an alias /hlist:

alias hlist {
  if (!$hget(0)) { echo -qgaec i * No hash tables in use }
  else {
    var %i 1
    while ($hget(%i) != $null) {
      echo -ga $v1
    }
  }
  echo -qgaec i End of /hlist.
}


Check if two random numbers between 1 and 5 are equivalent, and echo the matching numbers if so:

//echo -ga $iif($rand(1,5) == $rand(1,5),Yes! $v1 == $v2,No! $v1 != $v2) $+ !

Compatibility

Added: v6.16 Added on: 07/07/2004

See Also