If flag true

Command group Flag affected Reversible Execute on client Platform(s)
Constructs NO NO YES All

Syntax

If flag true

Description

This command lets you implement a branch or change of processing order within a method depending on the result of the previous command. It tests the flag and if it is true, the commands following the If flag true are executed. However, if the flag is false, control branches to the next ElseElse If or End If in the method.

Example

# Test if list line selected sets the flag to true if the line is selected
Set current list iMyList
Test if list line selected {2}
If flag true
  # If the list line is selected, processing continues here.
  OK message {The list line is selected}
End If