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_for.om

14 lines · 382 bytes Raw Blame History
1note fuel_for: a for over a scalar name with no bound has fuel 1000000 (front.om fe_lfor, omc SF_VAL): the
2note pass with i = 1000000 traps 4 (exit 104); a lowering with one pass more writes the line below first.
3text hit "pass 1000001\n"
4fn main to int
5n = ulong 2000000
6s = ulong 0
7for i ulong n
8if eq i 1000000
9k = write 1 hit 0 len hit
10end
11s = add s 1
12end
13ret int and s 255
14end