SA0119: Object-oriented features

Function

Determines the use of object-oriented features such as:

  • Function block declarations with EXTENDS or IMPLEMENTS
  • Property and interface declarations
  • Use of the THIS or SUPER pointer

Reason

Not all systems support object-oriented programming. The code becomes easier to port if object orientation is not used.

Importance

Low

Samples:

Interface I_Sample:

INTERFACE I_Sample                                  // => SA0119

Function block FB_Base:

FUNCTION_BLOCK FB_Base IMPLEMENTS I_Sample          // => SA0119

Function block FB_Sub:

FUNCTION_BLOCK FB_Sub EXTENDS FB_Base               // => SA0119

Method FB_Sub.SampleMethod:

METHOD SampleMethod : BOOL                          // no error

Get function of the property FB_Sub.SampleProperty:

VAR                                                 // => SA0119 
END_VAR

Set function of the property FB_Sub.SampleProperty:

VAR                                                 // => SA0119 
END_VAR