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 / tests / quantity / literal_bare.om
| 1 | fn main to int |
| 2 | a = qty 1 |
| 3 | b = add a 1 |
| 4 | c = add 1 a |
| 5 | if ne b 2 |
| 6 | ret 1 |
| 7 | end |
| 8 | if ne 2 c |
| 9 | ret 2 |
| 10 | end |
| 11 | if not lt a 2 |
| 12 | ret 3 |
| 13 | end |
| 14 | if not gt 2 a |
| 15 | ret 4 |
| 16 | end |
| 17 | if ne sub b 1 a |
| 18 | ret 5 |
| 19 | end |
| 20 | if ne mul a 2 b |
| 21 | ret 6 |
| 22 | end |
| 23 | ret 0 |
| 24 | end |