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

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,26 @@
void fun(int x)
{
x += 42;
}
void gun(int[] x)
{
x = [ 1, 2, 3 ];
}
void hun(int[] x)
{
x[0] = x[1];
}
unittest
{
int x = 10;
fun(x);
assert(x == 10); // Ничего не изменилось
int[] y = [ 10, 20, 30 ];
gun(y);
assert(y == [ 10, 20, 30 ]); // Ничего не изменилось
hun(y);
assert(y == [ 20, 20, 30 ]); // Изменилось!
}