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 / research / om-bench / controls / brk-main.om

28 lines · 291 bytes Raw Blame History
1text yes "yes\n"
2text no "no\n"
3fn main to int
4n = readall
5d = long 0
6ok = true
7for i ulong n
8c = get inb i
9if eq c 40
10d = add d 1
11end
12if eq c 41
13d = sub d 1
14if lt d 0
15ok = false
16end
17end
18end
19if ne d 0
20ok = false
21end
22if ok
23k = write 1 yes 0 len yes
24else
25k = write 1 no 0 len no
26end
27ret 0
28end