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

18 lines · 328 bytes Raw Blame History
1note put_flip.om: put changes a bool field both ways. Each correct read adds a distinct bit: 1 2 4.
2struct W a uint f bool end
3fn main to uint
4w = new W 9 false
5r = uint 0
6if eq get w f false
7r = add r 1
8end
9put w f true
10if eq get w f true
11r = add r 2
12end
13put w f false
14if eq get w f false
15r = add r 4
16end
17ret add r get w a
18end