vector[N] v;
v[{1,3,2,1,1,1}]
Is the following allowed? It compiles, it works.
Any side-effects?
(Before I used int I[6] = {1,3,2,1,1,1}; v[I]
Above is more handy)
vector[N] v;
v[{1,3,2,1,1,1}]
Is the following allowed? It compiles, it works.
Any side-effects?
(Before I used int I[6] = {1,3,2,1,1,1}; v[I]
Above is more handy)
The syntax is recursive, so yes, you can do that.
v[{1,3,2,1,1,1}] evaluates to same thing as [v[1], v[3], v[2], v[1], v[1], v[1]]'.