You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As of now, the following code compiles and validates without error. I'm not sure this is how it should behave. In my opinion, it should not be possible to redefine constants (at the very least not in the same scope they are defined in). Please discuss.
FUNCTION add : DINT
VAR CONSTANT
TWO : DINT := 2;
THREE : DINT := 3;
END_VAR
VAR
TWO : DINT := 4;
THREE : DINT := 5;
END_VAR
add := TWO + THREE;
END_FUNCTION
possibly also related, depending on how we want to approach multiple enumerations of the same name.
#569 (Global variable initializer type does not match global variable type)
I think #569 is not related, in there we need to support multiple enum variants with the same name if they are defined in different enums, the enums can then be accessed using Enum#Variant
As of now, the following code compiles and validates without error. I'm not sure this is how it should behave. In my opinion, it should not be possible to redefine constants (at the very least not in the same scope they are defined in). Please discuss.
The text was updated successfully, but these errors were encountered: