XE7¿¡¼ ´«¿¡ ¶ç´Â »çÇ×Àº ºí·çÅõ½º, ´ÙÁ߸ð´ÏÅÍ, ¸ÖƼÄÚ¾î º´·Äó¸®(½º·¹µå´ëü), µ¿Àû¹è¿Ã³¸®³×¿ä.
µ¿Àû¹è¿¿¡¼ Ç×»ó SetLength ½Å°æ½è´Âµ¥ °£ÆíÇϳ׿ä.
For example:
var A: array of integer; B: TBytes = [1,2,3,4]; //Initialization can be done from declaration begin ... A := [1,2,3]; // assignation using constant array A := A + [4, 5]; // addition - A will become [1,2,3,4,5] ... end;
String-like support routines added: 1. The Insert function inserts a dynamic array at the beginning at the position index. It returns the modified array.
var A: array of integer; begin ... A := [1,2,3,4]; Insert(5, A, 2); // A will become [1,2,5,3,4] ... end;
2. The Delete function eliminates elements from a dynamic array and returns the modifed array:
var A: array of integer; begin ... A := [1,2,3,4]; Delete(A, 1, 2); // A will become [1,4] ... end;
3. The Concat function can be used to put together two different dynamic arrays:
A := Concat( [1,2,3], [4,5,6] ); // A will become [1,2,3,4,5,6]
|