compiler-design-eth/javali_tests/HW4_nop90/Array/OkArrayAccess.javali

17 lines
244 B
Text
Raw Permalink Normal View History

2020-01-15 22:34:57 +01:00
/* Test accessing arrays */
class Main {
void main() {
int[] x;
int i;
x = new int[3];
x[0] = 3;
x[1] = 4;
x[2] = 5;
i = x[0] + x[1] + x[2];
x[2]=55;
write(i);
writeln();
}
}