IEC method/function parameters that have the parameter type Any
or a user struct
(Structs with the attributes [Structure]
, [String]
or [Array]
) have to use the ref
keyword.
IEC methods/functions with parameters are methods that either:
- have the attribute
[User]
- have the attribute
[Execution]
, are called__Process
and are in a class with the attribute[Function]
- have the attribute
[Function]
and are in a class with the attribute[FunctionContainer]
You can also use the provided automatic Code Fix to add the ref
keyword. ( Press Alt + Enter on the Error line to find the Code Fix in the context menu)
Add the ref
keyword to the parameter.