I want to do something like this:
const MyFirstConstArray: array[0..1] of string = ('Hi', 'Foo'); MySecondConstArrayWhichIncludesTheFirstOne: array[0..2] of string = MyFirstConstArray + ('Bar');
Basically I want the following result:
MyFirstConstArray -> ('Hi', 'Foo'); MySecondConstArrayWhichIncludesTheFirstOne -> ('Hi', 'Foo', 'Bar');
Is it possible somehow?
AFAIK, you can’t do that.
But if the goal is to ensure you declare your actual constant string only once, I suggest you declare the individual strings and then group them in arrays:
BTW, your syntax is incorrect, you have to precise the type of the array elements.