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
Currently there is no validation in place for variables being initialized in variable blocks. Trying to initialize a variable with an invalid type will fail during codegen, but not be reported beforehand.
e.g.:
VAR_GLOBAL
a : (red, yellow, green) := (1, 2, 3);
b : INT := 'wrong type';
c : STRING := 10(1000);
d : ARRAY[0..1] OF WSTRING := 1000;
END_VAR
FUNCTION main : DINT
VAR
a : (red, yellow, green) := (1, 2, 3);
b : INT := 'wrong type';
c : STRING := 10(1000);
d : ARRAY[0..1] OF WSTRING := 1000;
END_VAR
END_FUNCTION
The text was updated successfully, but these errors were encountered:
Currently there is no validation in place for variables being initialized in variable blocks. Trying to initialize a variable with an invalid type will fail during codegen, but not be reported beforehand.
e.g.:
The text was updated successfully, but these errors were encountered: