resource array_bounds() var a[1:13], b[-42:17], c[0:11], d[-7:-3], e[4:8] : int # procedure print_bounds_and_clear(ref x[*:*] : int) # is illegal; compiler says "fatal: both bounds are `*'" procedure print_bounds_and_clear(ref x[1:*] : int) writes("bounds[", lb(x), ":", ub(x), "]\n") fa i := lb(x) to ub(x) -> x[i] := 0 af # line 9 end print_bounds_and_clear print_bounds_and_clear(a) print_bounds_and_clear(b) print_bounds_and_clear(c) print_bounds_and_clear(d) print_bounds_and_clear(e) end array_bounds /* ............... Example compile and run(s) % sr -o array_bounds array_bounds.sr % ./array_bounds bounds[1:13] bounds[-42:17] RTS abort: file array_bounds.sr, line 9: illegal subscript [-42] of array with bounds [-42:17] */