Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Variable re-declatation in Subclasses is not allowed

A variable already declared in a parent class cannot be re-declared in a subclass.

Example:

FUNCTION_BLOCK FB
VAR
    a : INT;
END_VAR
END_FUNCTION_BLOCK

FUNCTION_BLOCK FB2 EXTENDS FB
VAR
    a : INT; // Error: Variable 'a' is already declared in the parent class
END_VAR
END_FUNCTION_BLOCK