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 / si / mcp / data / examples / control.om

29 lines · 355 bytes Raw Blame History
1note while with a bound, continue, break, for, if/else and bool values
2fn pick c bool to uint
3if c
4ret 100
5else
6ret 1
7end
8end
9fn main to int
10s = uint 0
11i = uint 0
12while lt i 100 bound 1000
13i = add i 1
14if eq rem i 2 0
15continue
16end
17if gt i 9
18break
19end
20s = add s i
21end
22for j uint 4
23s = add s j
24end
25t = true
26f = false
27s = add s pick and t not f
28ret int s
29end