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/func_value.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 / func_value.om` 22 lines ยท 459 bytes Raw Blame History 1 note func_value.om: a bool field set from the value of a function call, in new and in put. 2 note big(5) is true and big(2) is false: new with true -> 1, put false -> 2, put true -> 4, a=3. 3 struct W a uint f bool end 4 fn big x uint to bool 5 ret gt x 3 6 end 7 fn main to uint 8 w = new W 3 big 5 9 r = uint 0 10 if eq get w f true 11 r = add r 1 12 end 13 put w f big 2 14 if eq get w f false 15 r = add r 2 16 end 17 put w f big 9 18 if eq get w f true 19 r = add r 4 20 end 21 ret add r sub get w a 3 22 end