$ifmatch

From Scriptwiki
Revision as of 23:42, 27 November 2005 by Albie (talk | contribs) (added link to #The_Operators)

Jump to: navigation, search

Returns the first parameter of an if-then-else comparison.

$ifmatch

Note: $ifmatch is depreciated now and has been replaced by $v1 and $v2. You should switch to using $v1 and $v2 incase $ifmatch is no longer supported in future versions.

$v1 & $v2

These return the first and second parameters of an if-then-else comparison.

$v1
$v2

Example

if ($me isin $read(quotes.txt)) { echo -ag My nickname is in random quote: $v2 }

In the above example we check if $me is in the text returned by $read. If the comparison is sucessful $v2 is set to what ever $read returned.