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...
I can easily to 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 This is a challenge, I'd prefer to set all the values 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...
Same issue. The CmpDynamicText library has tools to set the text list to a file name and to update the text file. I guess we could point the text file to a csv, save to the csv file and then reload the text file from the csv. It seems bit convoluted and it also seems like basic functionality that should be considered for text files...am I missing something?
JSONByteArrayWriter appears to add a carriage return and line feed between each each JSON element. How can this be removed?