22 lines
No EOL
211 B
Text
22 lines
No EOL
211 B
Text
// test that call-by-value is used
|
|
|
|
|
|
class Main {
|
|
void main() {
|
|
int x;
|
|
A a;
|
|
a = new A();
|
|
a.a = 50;
|
|
aux(a.a);
|
|
x = a.a;
|
|
write(x);
|
|
}
|
|
|
|
void aux (int arg){
|
|
arg = arg + 1;
|
|
}
|
|
}
|
|
|
|
class A {
|
|
int a;
|
|
} |