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/qualification/om2/sec/s5s7/v6-sum.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 / qualification / om2 / sec / s5s7 / v6-sum.om` 26 lines ยท 549 bytes Raw Blame History 1 note SPDX-License-Identifier: Apache-2.0 2 note contract 6 lines 169-170 and erratum E2: unsized `view uchar *` parameters receive sized arrays of 3 note length 10 and 3; `len v` is the run-time length. stdout 10, 315, 3, 15 (exp/v6-sum.out, python3). 4 om2 5 fn vsum v view uchar * to ulong 6 x = ulong 0 7 for i ulong len v 8 x = add x ulong get v i 9 end 10 ret x 11 end 12 fn plen v view uchar * to ulong 13 ret len v 14 end 15 fn main to int 16 a = new uchar 10 0 17 for i ulong 10 18 put a i uchar mul i 7 19 end 20 b = new uchar 3 5 21 putd plen a 22 putd vsum a 23 putd plen b 24 putd vsum b 25 ret 0 26 end