compiler-design-eth/javali_tests/HW4_nop90/method invocation/OkCallByValue3.javali

19 lines
199 B
Text
Raw Normal View History

2020-01-15 22:34:57 +01:00
// test that call-by-value is used
class Main {
void main() {
int[] y;
int x;
y = new int[5];
y[2] = 50;
aux(y);
x = y[2];
write(x);
}
void aux (int[] arg){
arg[2] = 100;
}
}