Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/omega-mv/blob/main/tests/compiler/progs/bounds.osc # omega-mv Omega: a language for verified programs, semantic identity and machine realization. Seed-born work and existing implementations have distinct provenance. Brought by drakestapleton Sign in to star 1 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `main` Branches Tags History `omega-mv / tests / compiler / progs / bounds.osc` 13 lines ยท 342 bytes Raw Blame History 1 // entry: get set_get 2 // dynamic indexes: out-of-range traps BOUNDS (negative signed indexes too). 3 fn get(i: i8) -> i16 { 4 let a: own [i16; 10] = alloc(5); 5 for k in 0 .. 10 { a[k] = (k as i16) * 3; } 6 return a[i]; 7 } 8 9 fn set_get(i: u16, j: i32, v: i16) -> i16 { 10 let a: own [i16; 12] = alloc(-1); 11 a[i] = v; 12 return a[j]; 13 }