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 / ng / front / cases / fuel_while.om

14 lines · 414 bytes Raw Blame History
1note fuel_while: a while with no bound has fuel 1000000 (front.om fe_lwhile, omc S_WHILE): the 1000000th
2note pass ends with i = 1000000 and the next head traps 4 (exit 104); a lowering with one pass more
3note writes the line below first, so stdout differs.
4text hit "pass 1000001\n"
5fn main to int
6i = ulong 0
7while lt i 2000000
8i = add i 1
9if eq i 1000001
10k = write 1 hit 0 len hit
11end
12end
13ret int and i 255
14end