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 / only_field.om

18 lines · 290 bytes Raw Blame History
1note only_field.om: a struct whose only field is a bool (cell 0, nothing around it).
2struct F f bool end
3fn main to uint
4w = new F true
5r = uint 0
6if eq get w f true
7r = add r 1
8end
9put w f false
10if eq get w f false
11r = add r 2
12end
13put w f true
14if eq get w f true
15r = add r 4
16end
17ret r
18end