Перенос страниц

This commit is contained in:
Alexander Zhirov 2023-03-05 15:30:34 +03:00
parent 4d57446057
commit 4c954c9186
129 changed files with 14 additions and 15 deletions

View file

@ -0,0 +1,9 @@
void main()
{
int[] a = [0, 10, 20, 30, 40, 50, 60, 70];
auto b = a[4 .. $];
a = a[0 .. 4];
// Сей­час a и b при­мы­ка­ют друг к дру­гу
a ~= [0, 0, 0, 0];
assert(b == [40, 50, 60, 70]); // Тест прой­ден; мас­сив a был пе­ре­не­сен в но­вую об­ласть па­мя­ти
}