Can I use an array as a config const in Chapel ?
No.
This was explained by @bencray already in 2017/12 that
this is not yet supported in Chapel as of Chapel 1.16
In the meantime, a common proxy-solution exists:
One may always arrange inputs to take place from a configuration file ( a common step in a such configurable, pipeline organised computation flows ), given the wish is to read the whole configurable-array content.
If the attempt above was actually a wish to use a form of configurable means of indirect addressing,
let's
// DOG_STARTING_POSITION = [25, 25]
DOG_STARTING_POSITION_ROW = 25
DOG_STARTING_POSITION_COL = 25
// and the already compiled code may later freely reference the value by:
DOG_STARTING_POSITION = anArrayCONTENT[ DOG_STARTING_POSITION_ROW,
DOG_STARTING_POSITION_COL
];
/* using the indirect-addressing,
delivered as
config const ( i.e. as trivial int coordinates
from outside
the code-execution context
)
as late as
at run-time
*/