// Do not do this
METHOD largerThenTwelve
VAR_INPUT
number : INT;
END_VAR
IF number > 12 THEN
largerThenTwelve := TRUE;
ELSE
largerThenTwelve := FALSE;
END_IF
// Do this
METHOD largerThenTwelve
VAR_INPUT
number : INT;
END_VAR
largerThenTwelve := number > 12;
- Use `{attribute 'call_after_init'}` to call a method once after some _after_ the function block has been initialized instead of using `bInitialize`.
- Reduce the use of REFERENCE and POINTER as much as possible
- Do not call methods from multiple tasks. If you do use [this](https://infosys.beckhoff.com/content/1033/tc3_plc_intro/45844579955484184843.html?id=2972649925198044529).
_
as a thousand separator. For example:number : INT := 1_000_000
CASE
statement you can use multiple cases like1, 3, 61
or a whole range like1..10
.colors : (Red, Blue, Green);
https://alltwincat.com/2021/11/16/local-enumerations/Return an boolean immediately: