The problem you are facing is that your constants A and your variable B are of different types. This can be demonstrated most easily by showing how you declare const and var of the same type according to what you show in your question:
type TSA = array[0..3] of ShortString; const A: TSA = ( 'Customer', 'Supplier', 'Stock', 'GL'); var B: TSA;
With these ads, you can simply write:
B := A;
But when A is a dimensional array and B is a dynamic array, this is not possible, and your only option is SetLength (B) as needed and copy the elements one at a time.
Although the const and var types may look the same - or compatible types - it is not, and it is no different from trying to assign an Integer constant to a String variable ... although you know the simple conversion needed to achieve it, the compiler cannot assume that you intended to do this, so you have to be explicit and provide the conversion code yourself.
source share