Skip to content

Latest commit

 

History

History
20 lines (10 loc) · 815 Bytes

File metadata and controls

20 lines (10 loc) · 815 Bytes

Iec004 - Parameters of user types or Any have to use ref

Severity: Warning Warning

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]

Solution

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.