IF ELSE ENDIF

This commit is contained in:
2025-10-11 23:51:14 +02:00
parent 0e549b6e0a
commit 384f9c7197
11 changed files with 173 additions and 72 deletions

View File

@ -1,9 +1,14 @@
PROGRAM Demo
VAR
a int16 := 5;
b byte := a + 3;
c int32 := b * 2;
a int16 := 3;
b int16 := 5;
c int16;
END_VAR
a := a + c;
END_PROGRAM
IF a < b THEN
c := b - a;
ELSE
c := a - b;
END_IF;
END_PROGRAM