basic lihc
Member
Code:
void printoutput(int[int] input_argument)
{
int[int] incremented = input_argument;
print_html(incremented[1]);
incremented[1] += 1;
}
int[int] input;
input[1] = 0;
printoutput(input);
printoutput(input);
printoutput(input);
Returns:
0
1
2
Unless I misunderstand something what is expected is
the aggregate inside the function would not keep a persistent value when the function is called several times,
the input would prevail when writing it into the aggregate,
or an error message if it's wrong to modify a copy of an aggregate that was passed as argument? there is no error like "Cannot modify constant value"