if - branch based on the results of a comparison

Return to Introduction  Previous page  Next page

if $var,{EQ | NE | LT | GT | GE | LE},{text | $var},label:[,NOCASE]

Where:

$var is a variable. The text defined for the variable is substituted for the variable name and used in the comparison.
EQ | NE | LT | GT | GE | LEis the comparison type.
EQ        equal
NE        not equal
LT        less than
GT        greater than
GE        greater than or equal to
LE        Less than or equal to
textis any text string. Enclose the text in double quotation marks ("") if it contains embedded spaces, tabs or commas.
label:is a label in the script to branch to if the comparison is true. label names are case sensitive, contain no embedded blanks and end with a colon.
NOCASEuse a comparison that is not case sensitive.

 

The if command branches to the specified label in the script if the comparison is true. The comparisons in the if statement are string comparisons.

Examples

if $name,EQ,"John",ProcessName:

if $SCREEN(1,1,1,4),EQ,"John",ProcessName:,NOCASE

if $CLIPBOARD,LT,"225",ProcessCount:

 

See Also:

 

Script Command Summary

Script Variables

Using the Scripting Language


TN3270 Plus is continually being improved. To learn more about the latest enhancements, please review our Version History web page.