Invalid scripting example (incorrect nesting)
- Last UpdatedJul 23, 2024
- 1 minute read
If you are familiar with a language like Visual Basic, you might want to write a conditional structure with multiple conditions and a default condition like this:
IF ChoiceTag == 1 THEN
Show "Procedure 1";
ELSE IF ChoiceTag == 2 THEN
Show "Procedure 2";
ELSE IF ChoiceTag == 3 THEN
Show "Procedure 3";
ELSE
Show "Default Procedure";
ENDIF;
This does not work in the InTouch HMI. Each IF opens a new nesting level and must have a corresponding ENDIF statement. For a correct version of this example, see Nested conditional structure.