The ifr statement tests the result of a logical expression.
ifr logical.exp[then|else] statement.block ifr logical.exp then statement.block else statement.block
Each attribute of the first element of the expression is tested against the target. Depending on whether one of the attributes in the expression evaluates to either true or false, the statements following the then or else clauses, respectively, are executed.
Example 1
001 print "Input string":;input str2 002 str1="a":@am:"b" 003 ifr str1=str2 then print "match" else print "no match" run bp testifr Input string?a match run bp testifr Input string?b match run bp testifr Input string?ab no match
Example 2
Example ifr statement for mvBase compatibility mode:
001 print "Input string":;input str2 002 str1="a":@vm:"b" 003 ifr str2=str1 then print "match" else print "no match" run bp testifr Input string?a match run bp testifr Input string?b match run bp testifr Input string?ab no match