Thanks so much for sharing this.
I can easily do the following: VAR arrIndicatorColor : ARRAY[1..5] OF STRING; END_VAR arrIndicatorColor[1] := 'Red'; arrIndicatorColor[2] := 'Yellow'; . . . arrIndicatorColor[5] := 'White'; I'd prefer to set all the values of the array with a single line. ex: arrIndicatorColor := ['Red','Yellow','Green','Blue','White']; However this line of ST gives me an error "Unexpected array initialization". Is there a proper syntax? I can copy and paste, in my example it's only 5 array elements but if this was...
I can easily do the following: VAR arrIndicatorColor : ARRAY[1..5] OF STRING; END_VAR arrIndicatorColor[1] := 'Red'; arrIndicatorColor[2] := 'Yellow'; . . . arrIndicatorColor[5] := 'White'; I'd prefer to set all the values of the array with a single line. ex: arrIndicatorColor := ['Red','Yellow','Green','Blue','White']; However this line of ST gives me an error "Unexpected array initialization". Is there a proper syntax? I can copy and paste, in my example it's only 5 array elements but if this was...
I can easily do the following: VAR arrIndicatorColor : ARRAY[1..5] OF STRING; END_VAR arrIndicatorColor[1] := 'Red'; arrIndicatorColor[2] := 'Yellow'; . . . arrIndicatorColor[5] := 'White'; I'd prefer to set all the values of the array with a single line. ex: arrIndicatorColor := ['Red','Yellow','Green','Blue','White']; However this line of code gives me an error "Unexpected array initialization". Is there a proper syntax? I can copy and paste, in my example it's only 5 array elements but if this...
I can easily do the following: VAR arrIndicatorColor : ARRAY[1..5] OF STRING; END_VAR arrIndicatorColor[1] := 'Red'; arrIndicatorColor[2] := 'Yellow'; . . . arrIndicatorColor[5] := 'White'; I'd prefer to set all the values of the array with a single line. ex: arrIndicatorColor := ['Red','Yellow','Green','Blue','White']; However this line of code gives me an error "Unexpected array initialization". Is there a proper syntax? I can copy and paste, in my example it's only 5 array elements but if this...
I can easily do the following: VAR arrIndicatorColor : ARRAY[1..5] OF STRING; END_VAR arrIndicatorColor[1] := 'Red'; arrIndicatorColor[2] := 'Yellow'; . . . arrIndicatorColor[5] := 'White'; I'd prefer to set all the values of the array with a single line. ex: arrIndicatorColor := ['Red','Yellow','Green','Blue','White']; However this line of code gives me an error "Unexpected array initialization". Is there a proper syntax? I can copy and paste, in my example it's only 5 array elements but if this...
I can easily do the following: VAR arrIndicatorColor : ARRAY[1..5] OF STRING; END_VAR arrIndicatorColor[1] := "Red"; arrIndicatorColor[2] := "Yellow"; . . . arrIndicatorColor[5] := "White"; I'd prefer to set all the values of the array with a single line. ex: arrIndicatorColor := ["Red","Yellow","Green","Blue","White"]; However this line of code gives me an error "Unexpected array initialization". Is there a proper syntax? I can copy and paste, in my example it's only 5 array elements but if this...
I can easily do the following: VAR arrIndicatorColor : ARRAY[1..5] OF STRING; iColors : INT; END_VAR CASE iColors OF 1: arrIndicatorColor[1] := "Red"; arrIndicatorColor[2] := "Yellow"; . . . arrIndicatorColor[5] := "White"; END_CASE I'd prefer to set all the values of the array with a single line. ex: arrIndicatorColor := ["Red","Yellow","Green","Blue","White"]; However this line of code gives me an error "Unexpected array initialization". Is there a proper syntax? I can copy and paste, in my example...