Or any similar data structure of dynamic length, which, can be cast easily to an array. The only workaround I have found is entering the array as a string and manually parsing it.
config var not_array: string = '[1,2,3,4,5]' ;
proc main() {
// config array workaround
writeln("I am string. Definitely not array ", not_array) ;
// parse string
not_array = not_array.replace(' ','') ;
not_array = not_array.replace('[','') ;
not_array = not_array.replace(']','') ;
var still_not_array = not_array.split(',') ;
// prepare array
var dom = 0..#still_not_array.size ;
var array: [dom] real ;
// populate array
for (i, x) in zip(dom, still_not_array) {
array[i] = x:real ;
}
writeln("Ha! Tricked you, am actually array ", array) ;
}
This works as intended, but is there a better way?