CS153/hw5/hw5programs/compile_struct_array.oat
jmug cfe502c598 Add all the assignment code.
Signed-off-by: jmug <u.g.a.mariano@gmail.com>
2025-01-24 18:59:28 -08:00

13 lines
233 B
Text

struct Test {
int[] xs;
int y;
int[] zs
}
global arr_x = new int[] {3,4,5};
global arr_z = new int[] {4,5,6};
int program(int argc, string[] argv) {
var t = new Test {xs=arr_x; y=3; zs=arr_z};
return t.xs[0] * t.zs[1];
}