interplane.Get Omega
Read in your language

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

branch main Branches Tags History

omega-mv / seed / omc / tests / struct-bool / array_bool.om

18 lines · 325 bytes Raw Blame History
1note A bool array field uses the admitted struct-field grammar.
2note Its true/false/true elements contribute 1 + 0 + 4 = 5.
3struct Q v bool 3 end
4fn main to uint
5q = new Q true
6put q v 1 false
7r = uint 0
8if eq get q v 0 true
9r = add r 1
10end
11if eq get q v 1 true
12r = add r 2
13end
14if eq get q v 2 true
15r = add r 4
16end
17ret r
18end