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/struct-bool/param_view.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 / struct-bool / param_view.om` 14 lines ยท 396 bytes Raw Blame History 1 note param_view.om: a bool field read through a view parameter in a helper that returns a number. 2 note true counts 2 and false counts 1 for each of two structs, plus the numbers: 2 + 1 + 20 + 30. 3 struct W a uint f bool end 4 fn weight v view W to uint 5 if eq get v f true 6 ret add 2 get v a 7 end 8 ret add 1 get v a 9 end 10 fn main to uint 11 p = new W 20 true 12 q = new W 30 false 13 ret add weight p weight q 14 end