//ww:run-exit 70 package main; type box = struct { pc: size, matched: bool }; fn add(p: *[]box, v: size) void = { if (v % 2 == 0) { append(*p, box { pc = v, matched = true }); } else { append(*p, box { pc = v, matched = false }); }; }; export fn main() i32 = { let lo: i64 = 0x5151; let bs: []box = []; let hi: i64 = 0x7272; let i: size = 0; for (i < 100) { add(&bs, i); i += 1; }; if (len(bs) != 100) { return 1; }; let j: size = 0; for (j < 100) { if (bs[j].pc != j) { return 2; }; if (bs[j].matched != (j % 2 == 0)) { return 3; }; j += 1; }; if (lo != 0x5151 || hi != 0x7272) { return 4; }; return 70; };