You can assign a whole vector at once to an array.
scchart vectors { output int arr[5] = (1, 2, 3, 4, 5) initial state init { entry do arr = (6, 7, 8, 9, 10) } } |
To assign only certain values of an array, you can also use the ignore value placeholder. Consult the expression manual for further information.
scchart C { const int A = 1 output int arr[3][2] = ((A,0), (2,0), (3,0)) initial state init --> init do arr = ((arr[0] + 1, _), _, (arr[2] + 1, _)) } |
This would for example result in c code assignments as displayed on the right.