I have a fixed constant array
constAry1: array [1..10] of byte = (1,2,3,4,5,6,7,8,9,10);
and a dynamic array
dynAry1: array of byte;
What is the easiest way to copy the values from constAry1 to dynAry1?
Does it change if you have a const array of arrays (multidimensional)?
constArys: array [1..10] of array [1..10] of byte = . . . . .
From Delphi XE7, the use of string-like operations with arrays is allowed. Then you can declare a constant of a dynamic array directly. For example:
const
KEY: TBytes = [$97, $45, $3b, $3e, $c8, $14, $c9, $e1];
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With