IF provides conditional execution of commands in TSP. It requires a subsequent THEN statement, and may also be followed by an ELSE statement if you wish to have a branch for a false result.
IF <scalar expression> ;
Usage
The result of the scalar expression following IF is interpreted as true if it is larger than zero and false otherwise. If the result of the expression is a logical value itself (for example, TEST < 2.0) it will be given the value one for true and zero for false by TSP. The expression must be formulated using TSP's Basic Rules for formula construction.
Only if the expression gives a true result will the statement following the next THEN ; statement be executed. If that statement is a DO statement, all the statements up to the closing ENDDO ; statement will be executed. If there is an ELSE ; statement subsequently, the statements following it will be executed in the same manner if the result of the IF was false.