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 / cflow / pl-frneg8.om

14 lines · 397 bytes Raw Blame History
1note for test at the latch on a byte counter (type 6, the smallest signed type) that the body makes negative
2note (B.LT, not B.LO): the first pass sets i to -5, so i = 0, -4 .. 2 runs 8 passes (exit 8); an unsigned
3note latch test leaves after 1 pass. frneg pins the same choice for long (type 9).
4om2
5fn main to int
6n = long 0
7for i byte 3
8if eq n 0
9i = sub i 5
10end
11n = add n 1
12end
13ret int n
14end