To use a three-dimensional array:
INT ArrayA[4][3][2]=1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,
16,17,18,19,20,21,22,23,24;
This array sets the following values:
ArrayA[0][0][0]=1 |
ArrayA[0][0][1]=2 |
ArrayA[0][1][0]=3 |
ArrayA[0][1][1]=4 |
ArrayA[0][2][0]=5 |
ArrayA[0][2][1]=6 |
ArrayA[1][0][0]=7 |
ArrayA[1][0][1]=8 |
ArrayA[1][1][0]=9 |
ArrayA[1][1][1]=10 |
ArrayA[1][2][0]=11 |
ArrayA[1][2][1]=12 |
ArrayA[2][0][0]=13 |
ArrayA[2][0][1]=14 |
ArrayA[2][1][0]=15 |
ArrayA[2][1][1]=16 |
ArrayA[2][2][0]=17 |
ArrayA[2][2][1]=18 |
ArrayA[3][0][0]=19 |
ArrayA[3][0][1]=20 |
ArrayA[3][1][0]=21 |
ArrayA[3][1][1]=22 |
ArrayA[3][2][0]=23 |
ArrayA[3][2][1]=24 |
You use arrays in your functions in the same way as other variables, but arrays have special properties that, in many situations, reduce the amount of code you need to write.
Note: Citect SCADA also provides a set of array functions that support associations with animation objects. See Array Functions.
See Also
Published June 2018