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
omega-mv / seed / ng / front / cases / fuel_for.om
| 1 | note fuel_for: a for over a scalar name with no bound has fuel 1000000 (front.om fe_lfor, omc SF_VAL): the |
| 2 | note pass with i = 1000000 traps 4 (exit 104); a lowering with one pass more writes the line below first. |
| 3 | text hit "pass 1000001\n" |
| 4 | fn main to int |
| 5 | n = ulong 2000000 |
| 6 | s = ulong 0 |
| 7 | for i ulong n |
| 8 | if eq i 1000000 |
| 9 | k = write 1 hit 0 len hit |
| 10 | end |
| 11 | s = add s 1 |
| 12 | end |
| 13 | ret int and s 255 |
| 14 | end |