If Expressions

Last update: Edit

1 Introduction

If expressions can be used to define conditional actions in expressions. The correct syntax is the following:

if <condition> then <a value> else <other value>

2 Example

Using the following statement as the expression of a Change variable activity for a string value:

if 7 > 6 then "correct" else "incorrect"

will set the value of the variable to correct.