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/seed/omc/tests/pools/g2a.om # 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 / seed / omc / tests / pools / g2a.om` 39 lines ยท 705 bytes Raw Blame History 1 note gate-pools 2: an index equal to the length (a variable) traps 3 before any store; len + 1 is in range 2 note after a grow. With the compare removed the put lands and the next lines print 9. 3 global P ulong * 4 global ob uchar 24 5 fn pnum v ulong to void 6 put ob 23 10 7 i = ulong 23 8 x = v 9 go = true 10 while go bound 21 11 i = sub i 1 12 put ob i uchar add rem x 10 48 13 x = div x 10 14 go = ne x 0 15 end 16 k = write 1 ob i sub 24 i 17 end 18 fn plong v long to void 19 if lt v 0 20 put ob 0 uchar 45 21 k = write 1 ob 0 1 22 pnum ulong neg v 23 else 24 pnum ulong v 25 end 26 end 27 fn main to int 28 r = enlarge P ulong 10 29 put P 9 1 30 pnum get P 9 31 r = enlarge P ulong 11 32 put P 10 5 33 pnum get P 10 34 i = len P 35 put P i 9 36 r = enlarge P ulong 12 37 pnum get P 11 38 ret 0 39 end