Перенос страниц
This commit is contained in:
parent
4d57446057
commit
4c954c9186
129 changed files with 14 additions and 15 deletions
|
@ -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 ]); // Изменилось!
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue