SA0107: Missing formal parameters
Detects whether or not formal parameters are missing
Justification: Code becomes more readable when formal parameters are specified in the call.
Importance: Low
Example 95. Example
FUNCTION FUNA : BOOL
VAR_INPUT
bDo : BOOL;
bInit : BOOL;
bManual : BOOL;
END_VAR
VAR
iInit : INT;
iLocal : INT;
iManual : INT;
END_VAR
IF bInit = TRUE THEN
iInit := iInit + 1;
END_IF
IF bDo = TRUE THEN
iLocal := iLocal + 1;
END_IF
IF bManual = TRUE THEN
iManual := iManual + 1;
END_IF
FUNA := TRUE;
PROGRAM PLC_PRG VAR END_VAR
FUNA(bInit := TRUE, bDo := TRUE, bManual := FALSE); // OK FUNA(TRUE, TRUE, bManual:= FALSE); // SA0107
Output in the Messages view:
SA0107: Missing formal parameter for input 'TRUE'